diff --git a/Cargo.toml b/Cargo.toml index a261db9..2b6611e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ include = [ ] [dependencies] -smallvec = "1.13.2" +smallvec = { version = "1.13.2", features = ["const_new"] } [dev-dependencies] bytes = "1" diff --git a/src/node.rs b/src/node.rs index 5c9d1ab..61ed5a0 100644 --- a/src/node.rs +++ b/src/node.rs @@ -384,7 +384,7 @@ impl Node { } pub fn find(&self, bytes: &[u8]) -> Option<(&T, SmallVec<[Range; 8]>)> { - let mut ranges = SmallVec::<[Range; 8]>::new(); // opt! + let mut ranges = SmallVec::<[Range; 8]>::new_const(); // opt! return self._find(0, bytes, &mut ranges).map(|t| (t, ranges)); } }