diff --git a/lib/src/dag_walk.rs b/lib/src/dag_walk.rs index 17cd1db83..f85c17c99 100644 --- a/lib/src/dag_walk.rs +++ b/lib/src/dag_walk.rs @@ -288,7 +288,7 @@ where { let start: Vec = start.into_iter().collect(); let mut reachable: HashSet = start.iter().cloned().collect(); - for _node in dfs(start.into_iter(), id_fn, |node| { + for _node in dfs(start, id_fn, |node| { let neighbors: Vec = neighbors_fn(node).into_iter().collect(); for neighbor in &neighbors { reachable.remove(neighbor); diff --git a/lib/src/git.rs b/lib/src/git.rs index 8d4b3d0b1..167ef8bcf 100644 --- a/lib/src/git.rs +++ b/lib/src/git.rs @@ -294,7 +294,7 @@ pub fn import_some_refs( // come from branches which were never fetched. let mut pinned_git_heads_set = HashSet::new(); for heads_for_ref in pinned_git_heads.into_values() { - pinned_git_heads_set.extend(heads_for_ref.into_iter()); + pinned_git_heads_set.extend(heads_for_ref); } pinned_git_heads_set.retain(|id| mut_repo.index().has_id(id)); // We could use mut_repo.record_rewrites() here but we know we only need to care @@ -986,7 +986,7 @@ pub fn parse_gitmodules( // Partial config value for each submodule name let mut partial_configs: BTreeMap = BTreeMap::new(); - let entries = git_config.entries(Some(r#"submodule\..+\."#))?; + let entries = git_config.entries(Some(r"submodule\..+\."))?; entries.for_each(|entry| { let (config_name, config_value) = match (entry.name(), entry.value()) { // Reject non-utf8 entries diff --git a/src/commands/branch.rs b/src/commands/branch.rs index c4cc1e1ef..ad12cf03a 100644 --- a/src/commands/branch.rs +++ b/src/commands/branch.rs @@ -239,7 +239,7 @@ fn find_globs( if names.is_empty() { failed_globs.push(glob); } - matching_branches.extend(names.into_iter()); + matching_branches.extend(names); } match &failed_globs[..] { [] => { /* No problem */ }