mirror of
https://github.com/jj-vcs/jj.git
synced 2025-12-23 06:01:01 +00:00
rewrite: build Vec instances directly
`[].to_vec()` looks like a manual implementation of `vec![]`.
This commit is contained in:
parent
9e80d0c51d
commit
33f9b89350
1 changed files with 2 additions and 2 deletions
|
|
@ -569,7 +569,7 @@ pub fn move_commits(
|
|||
if let Some(parent_ids) = target_commits_external_parents.get(parent_id) {
|
||||
parent_ids.iter().cloned().collect_vec()
|
||||
} else {
|
||||
[parent_id.clone()].to_vec()
|
||||
vec![parent_id.clone()]
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
|
@ -638,7 +638,7 @@ pub fn move_commits(
|
|||
if let Some(children) = target_commit_external_descendants.get(child.id()) {
|
||||
children.iter().cloned().collect_vec()
|
||||
} else {
|
||||
[child.clone()].to_vec()
|
||||
vec![child.clone()]
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue