mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 14:13:58 +00:00
Impl FusedIterator
for IdxRange
This commit is contained in:
parent
665c0cb547
commit
add94d3b9c
1 changed files with 3 additions and 1 deletions
|
@ -6,7 +6,7 @@
|
||||||
use std::{
|
use std::{
|
||||||
cmp, fmt,
|
cmp, fmt,
|
||||||
hash::{Hash, Hasher},
|
hash::{Hash, Hasher},
|
||||||
iter::Enumerate,
|
iter::{Enumerate, FusedIterator},
|
||||||
marker::PhantomData,
|
marker::PhantomData,
|
||||||
ops::{Index, IndexMut, Range, RangeInclusive},
|
ops::{Index, IndexMut, Range, RangeInclusive},
|
||||||
};
|
};
|
||||||
|
@ -212,6 +212,8 @@ impl<T> DoubleEndedIterator for IdxRange<T> {
|
||||||
|
|
||||||
impl<T> ExactSizeIterator for IdxRange<T> {}
|
impl<T> ExactSizeIterator for IdxRange<T> {}
|
||||||
|
|
||||||
|
impl<T> FusedIterator for IdxRange<T> {}
|
||||||
|
|
||||||
impl<T> fmt::Debug for IdxRange<T> {
|
impl<T> fmt::Debug for IdxRange<T> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
f.debug_tuple(&format!("IdxRange::<{}>", std::any::type_name::<T>()))
|
f.debug_tuple(&format!("IdxRange::<{}>", std::any::type_name::<T>()))
|
||||||
|
|
Loading…
Reference in a new issue