Skip to content

Commit

Permalink
Fix lifetimes for get in bptree
Browse files Browse the repository at this point in the history
  • Loading branch information
Erigara committed Nov 3, 2023
1 parent e2eb4fa commit fe1029e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bptree/impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Q: ?Sized>(&'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>,
Q: Ord,
Expand Down Expand Up @@ -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<Q: ?Sized>(&'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>,
Q: Ord,
Expand Down

0 comments on commit fe1029e

Please sign in to comment.