Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
Signed-off-by: Sascha Grunert <[email protected]>
  • Loading branch information
saschagrunert committed Dec 6, 2024
1 parent 618c219 commit 7004960
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions indextree/src/debug_pretty_print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ impl<'a, T> DebugPrettyPrint<'a, T> {
}
}

impl<'a, T: fmt::Display> fmt::Display for DebugPrettyPrint<'a, T> {
impl<T: fmt::Display> fmt::Display for DebugPrettyPrint<'_, T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let is_alternate = f.alternate();
let mut writer = IndentWriter::new(f);
Expand Down Expand Up @@ -274,7 +274,7 @@ impl<'a, T: fmt::Display> fmt::Display for DebugPrettyPrint<'a, T> {
}
}

impl<'a, T: fmt::Debug> fmt::Debug for DebugPrettyPrint<'a, T> {
impl<T: fmt::Debug> fmt::Debug for DebugPrettyPrint<'_, T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let is_alternate = f.alternate();
let mut writer = IndentWriter::new(f);
Expand Down
12 changes: 6 additions & 6 deletions indextree/src/traverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ impl<'a, T> Descendants<'a, T> {
}
}

impl<'a, T> Iterator for Descendants<'a, T> {
impl<T> Iterator for Descendants<'_, T> {
type Item = NodeId;

fn next(&mut self) -> Option<NodeId> {
Expand All @@ -236,7 +236,7 @@ impl<'a, T> Iterator for Descendants<'a, T> {
}
}

impl<'a, T> core::iter::FusedIterator for Descendants<'a, T> {}
impl<T> core::iter::FusedIterator for Descendants<'_, T> {}

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
/// Indicator if the node is at a start or endpoint of the tree
Expand Down Expand Up @@ -496,7 +496,7 @@ impl<'a, T> Traverse<'a, T> {
}
}

impl<'a, T> Iterator for Traverse<'a, T> {
impl<T> Iterator for Traverse<'_, T> {
type Item = NodeEdge;

fn next(&mut self) -> Option<NodeEdge> {
Expand All @@ -506,7 +506,7 @@ impl<'a, T> Iterator for Traverse<'a, T> {
}
}

impl<'a, T> core::iter::FusedIterator for Traverse<'a, T> {}
impl<T> core::iter::FusedIterator for Traverse<'_, T> {}

#[derive(Clone)]
/// An iterator of the "sides" of a node visited during a depth-first pre-order traversal,
Expand Down Expand Up @@ -537,7 +537,7 @@ impl<'a, T> ReverseTraverse<'a, T> {
}
}

impl<'a, T> Iterator for ReverseTraverse<'a, T> {
impl<T> Iterator for ReverseTraverse<'_, T> {
type Item = NodeEdge;

fn next(&mut self) -> Option<NodeEdge> {
Expand All @@ -547,4 +547,4 @@ impl<'a, T> Iterator for ReverseTraverse<'a, T> {
}
}

impl<'a, T> core::iter::FusedIterator for ReverseTraverse<'a, T> {}
impl<T> core::iter::FusedIterator for ReverseTraverse<'_, T> {}

0 comments on commit 7004960

Please sign in to comment.