Skip to content

Commit

Permalink
Elide explicit lifetimes
Browse files Browse the repository at this point in the history
This fixes clippy warnings
  • Loading branch information
Fairglow committed Nov 29, 2024
1 parent 7a72956 commit 76d3701
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "index_list"
version = "0.2.13"
version = "0.2.14"
description = "A doubly linked list implemented in safe Rust using vector indexes"
keywords = ["linked-list"]
categories = ["data-structures"]
Expand Down
4 changes: 2 additions & 2 deletions src/listdrainiter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ impl<'a, T> ListDrainIter<'a, T> {
}
}

impl<'a, T> Iterator for ListDrainIter<'a, T> {
impl<T> Iterator for ListDrainIter<'_, T> {
type Item = T;
fn next(&mut self) -> Option<Self::Item> {
self.0.remove_first()
}
}

impl<'a, T> DoubleEndedIterator for ListDrainIter<'a, T> {
impl<T> DoubleEndedIterator for ListDrainIter<'_, T> {
fn next_back(&mut self) -> Option<Self::Item> {
self.0.remove_last()
}
Expand Down
2 changes: 1 addition & 1 deletion src/listiter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl<'a, T> Iterator for ListIter<'a, T> {
}
impl<T> FusedIterator for ListIter<'_, T> {}

impl<'a, T> DoubleEndedIterator for ListIter<'a, T> {
impl<T> DoubleEndedIterator for ListIter<'_, T> {
fn next_back(&mut self) -> Option<Self::Item> {
let item = self.list.get(self.prev);
self.prev = self.list.prev_index(self.prev);
Expand Down

0 comments on commit 76d3701

Please sign in to comment.