Fix clippy lint in new rustc nightly
New nightly lint warning "called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator" Code that gives the warning is correct, allow the lint to remove the warning. Update rustc nightly to 2025-01-16
This commit is contained in:
parent
39dd3cad20
commit
20d3f16a54
|
@ -252,6 +252,7 @@ impl Iterator for IntoIter {
|
|||
fn nth(&mut self, n: usize) -> Option<Self::Item> { self.0.nth(n) }
|
||||
|
||||
#[inline]
|
||||
#[allow(clippy::double_ended_iterator_last)] // False positive. Using `.last()` on a `vec::IntoIter` is correct.
|
||||
fn last(self) -> Option<Self::Item> { self.0.last() }
|
||||
|
||||
#[inline]
|
||||
|
|
|
@ -1 +1 @@
|
|||
nightly-2025-01-10
|
||||
nightly-2025-01-16
|
||||
|
|
Loading…
Reference in New Issue