Merge pull request #3106 from gitbutlerapp/remove-needless-vec-copy

remove needless vec copy
This commit is contained in:
Josh Junon 2024-03-11 15:17:24 +01:00 committed by GitHub
commit 467c33ee64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1265,9 +1265,7 @@ pub fn create_virtual_branch(
let mut all_virtual_branches = Iterator::new(&current_session_reader)
.context("failed to create branch iterator")?
.collect::<Result<Vec<branch::Branch>, reader::Error>>()
.context("failed to read virtual branches")?
.into_iter()
.collect::<Vec<branch::Branch>>();
.context("failed to read virtual branches")?;
all_virtual_branches.sort_by_key(|branch| branch.order);
let order = create