Skip to content

Commit

Permalink
deps: enable smallvec const_new feature (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
fundon authored Jun 24, 2024
1 parent 8df39b4 commit cceab18
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ include = [
]

[dependencies]
smallvec = "1.13.2"
smallvec = { version = "1.13.2", features = ["const_new"] }

[dev-dependencies]
bytes = "1"
Expand Down
2 changes: 1 addition & 1 deletion src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ impl<T: fmt::Debug> Node<T> {
}

pub fn find(&self, bytes: &[u8]) -> Option<(&T, SmallVec<[Range<usize>; 8]>)> {
let mut ranges = SmallVec::<[Range<usize>; 8]>::new(); // opt!
let mut ranges = SmallVec::<[Range<usize>; 8]>::new_const(); // opt!
return self._find(0, bytes, &mut ranges).map(|t| (t, ranges));
}
}
Expand Down

0 comments on commit cceab18

Please sign in to comment.