Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
This commit is contained in:
Piotr Osiewicz 2025-02-28 18:33:35 +01:00 committed by GitHub
parent fc52b43159
commit e4e758db3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
68 changed files with 180 additions and 190 deletions

View file

@ -9,7 +9,7 @@ struct StackEntry<'a, T: Item, D> {
position: D,
}
impl<'a, T: Item + fmt::Debug, D: fmt::Debug> fmt::Debug for StackEntry<'a, T, D> {
impl<T: Item + fmt::Debug, D: fmt::Debug> fmt::Debug for StackEntry<'_, T, D> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("StackEntry")
.field("index", &self.index)
@ -27,7 +27,7 @@ pub struct Cursor<'a, T: Item, D> {
at_end: bool,
}
impl<'a, T: Item + fmt::Debug, D: fmt::Debug> fmt::Debug for Cursor<'a, T, D>
impl<T: Item + fmt::Debug, D: fmt::Debug> fmt::Debug for Cursor<'_, T, D>
where
T::Summary: fmt::Debug,
{
@ -742,14 +742,14 @@ struct SliceSeekAggregate<T: Item> {
struct SummarySeekAggregate<D>(D);
impl<'a, T: Item> SeekAggregate<'a, T> for () {
impl<T: Item> SeekAggregate<'_, T> for () {
fn begin_leaf(&mut self) {}
fn end_leaf(&mut self, _: &<T::Summary as Summary>::Context) {}
fn push_item(&mut self, _: &T, _: &T::Summary, _: &<T::Summary as Summary>::Context) {}
fn push_tree(&mut self, _: &SumTree<T>, _: &T::Summary, _: &<T::Summary as Summary>::Context) {}
}
impl<'a, T: Item> SeekAggregate<'a, T> for SliceSeekAggregate<T> {
impl<T: Item> SeekAggregate<'_, T> for SliceSeekAggregate<T> {
fn begin_leaf(&mut self) {}
fn end_leaf(&mut self, cx: &<T::Summary as Summary>::Context) {
self.tree.append(

View file

@ -1468,7 +1468,7 @@ mod tests {
}
}
impl<'a> Dimension<'a, IntegersSummary> for u8 {
impl Dimension<'_, IntegersSummary> for u8 {
fn zero(_cx: &()) -> Self {
Default::default()
}
@ -1478,7 +1478,7 @@ mod tests {
}
}
impl<'a> Dimension<'a, IntegersSummary> for Count {
impl Dimension<'_, IntegersSummary> for Count {
fn zero(_cx: &()) -> Self {
Default::default()
}
@ -1488,13 +1488,13 @@ mod tests {
}
}
impl<'a> SeekTarget<'a, IntegersSummary, IntegersSummary> for Count {
impl SeekTarget<'_, IntegersSummary, IntegersSummary> for Count {
fn cmp(&self, cursor_location: &IntegersSummary, _: &()) -> Ordering {
self.0.cmp(&cursor_location.count)
}
}
impl<'a> Dimension<'a, IntegersSummary> for Sum {
impl Dimension<'_, IntegersSummary> for Sum {
fn zero(_cx: &()) -> Self {
Default::default()
}

View file

@ -26,7 +26,7 @@ impl<K> Default for MapKey<K> {
#[derive(Clone, Debug)]
pub struct MapKeyRef<'a, K>(Option<&'a K>);
impl<'a, K> Default for MapKeyRef<'a, K> {
impl<K> Default for MapKeyRef<'_, K> {
fn default() -> Self {
Self(None)
}