diff --git a/src/bptree/impl.rs b/src/bptree/impl.rs index 0b499b7..fe2cb6f 100644 --- a/src/bptree/impl.rs +++ b/src/bptree/impl.rs @@ -308,7 +308,7 @@ impl<'a, K: Clone + Ord + Debug + Sync + Send + 'static, V: Clone + Sync + Send { /// Retrieve a value from the tree. If the value exists, a reference is returned /// as `Some(&V)`, otherwise if not present `None` is returned. - pub fn get(&'a self, k: &'a Q) -> Option<&'a V> + pub fn get<'b, Q: ?Sized>(&'a self, k: &'b Q) -> Option<&'a V> where K: Borrow, Q: Ord, @@ -395,7 +395,7 @@ impl<'a, K: Clone + Ord + Debug + Sync + Send + 'static, V: Clone + Sync + Send { /// Retrieve a value from the tree. If the value exists, a reference is returned /// as `Some(&V)`, otherwise if not present `None` is returned. - pub fn get(&'a self, k: &'a Q) -> Option<&'a V> + pub fn get<'b, Q: ?Sized>(&'a self, k: &'b Q) -> Option<&'a V> where K: Borrow, Q: Ord,