diff --git a/src/bnb.rs b/src/bnb.rs index 5df7754..ef0116e 100644 --- a/src/bnb.rs +++ b/src/bnb.rs @@ -167,7 +167,7 @@ struct Branch<'a> { is_exclusion: bool, } -impl<'a> Ord for Branch<'a> { +impl Ord for Branch<'_> { fn cmp(&self, other: &Self) -> core::cmp::Ordering { // NOTE: Reverse comparision `lower_bound` because we want a min-heap (by default BinaryHeap // is a max-heap). @@ -181,19 +181,19 @@ impl<'a> Ord for Branch<'a> { } } -impl<'a> PartialOrd for Branch<'a> { +impl PartialOrd for Branch<'_> { fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } } -impl<'a> PartialEq for Branch<'a> { +impl PartialEq for Branch<'_> { fn eq(&self, other: &Self) -> bool { self.lower_bound == other.lower_bound } } -impl<'a> Eq for Branch<'a> {} +impl Eq for Branch<'_> {} /// A branch and bound metric where we minimize the [`Ordf32`] score. /// diff --git a/src/coin_selector.rs b/src/coin_selector.rs index 5dd6e60..deef23a 100644 --- a/src/coin_selector.rs +++ b/src/coin_selector.rs @@ -578,7 +578,7 @@ impl<'a> CoinSelector<'a> { } } -impl<'a> core::fmt::Display for CoinSelector<'a> { +impl core::fmt::Display for CoinSelector<'_> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "[")?; let mut candidates = self.candidates().peekable(); @@ -619,7 +619,7 @@ impl<'a> Iterator for SelectIter<'a> { } } -impl<'a> DoubleEndedIterator for SelectIter<'a> { +impl DoubleEndedIterator for SelectIter<'_> { fn next_back(&mut self) -> Option { let (index, wv) = self.cs.unselected().next_back()?; self.cs.select(index);