Remove unnecessary cloned

This commit is contained in:
Dániel Buga 2020-12-20 21:41:15 +01:00
parent 62f593bda9
commit 91ea623f49

View File

@ -1977,7 +1977,7 @@ fn resolve_qpath_anywhere(
) -> Result<Option<PartialRes>, Spanned<ResolutionError<'a>>> {
let mut fin_res = None;
for (i, ns) in [primary_ns, TypeNS, ValueNS].iter().cloned().enumerate() {
for (i, &ns) in [primary_ns, TypeNS, ValueNS].iter().enumerate() {
if i == 0 || ns != primary_ns {
match self.resolve_qpath(id, qself, path, ns, span, crate_lint)? {
Some(partial_res)