Skip to content

Commit

Permalink
Reserve vec capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
QuarticCat committed Sep 30, 2022
1 parent 4e450cb commit b0ab6c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diff/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ pub fn set_neighbours<'syn, 'b>(
return;
}

let mut res = vec![];
let mut res = Vec::with_capacity(4);

let mut add_neighbor = std::convert::identity(
#[inline(always)]
Expand Down

0 comments on commit b0ab6c8

Please sign in to comment.