mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-04 09:53:04 +03:00
Remove unnecessary cloned
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user