Skip to content

Commit cceab18

Browse files
authored
deps: enable smallvec const_new feature (#42)
1 parent 8df39b4 commit cceab18

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ include = [
2121
]
2222

2323
[dependencies]
24-
smallvec = "1.13.2"
24+
smallvec = { version = "1.13.2", features = ["const_new"] }
2525

2626
[dev-dependencies]
2727
bytes = "1"

src/node.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ impl<T: fmt::Debug> Node<T> {
384384
}
385385

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

0 commit comments

Comments
 (0)