Remove multiline uses

This commit is contained in:
Waffle 2020-10-08 20:08:40 +03:00
parent e0e906b517
commit 461265825b
21 changed files with 61 additions and 115 deletions

View File

@ -1,8 +1,5 @@
use crate::{
iter::{DoubleEndedIterator, FusedIterator, Iterator, TrustedLen},
ops::Try,
usize,
};
use crate::iter::{DoubleEndedIterator, FusedIterator, Iterator, TrustedLen};
use crate::{ops::Try, usize};
/// An iterator that links two iterators together, in a chain.
///

View File

@ -1,9 +1,6 @@
use crate::{
iter::{
adapters::zip::try_get_unchecked, adapters::TrustedRandomAccess, FusedIterator, TrustedLen,
},
ops::Try,
};
use crate::iter::adapters::{zip::try_get_unchecked, TrustedRandomAccess};
use crate::iter::{FusedIterator, TrustedLen};
use crate::ops::Try;
/// An iterator that clones the elements of an underlying iterator.
///

View File

@ -1,9 +1,6 @@
use crate::{
iter::{
adapters::zip::try_get_unchecked, adapters::TrustedRandomAccess, FusedIterator, TrustedLen,
},
ops::Try,
};
use crate::iter::adapters::{zip::try_get_unchecked, TrustedRandomAccess};
use crate::iter::{FusedIterator, TrustedLen};
use crate::ops::Try;
/// An iterator that copies the elements of an underlying iterator.
///

View File

@ -1,10 +1,6 @@
use crate::{
iter::{
adapters::{zip::try_get_unchecked, SourceIter, TrustedRandomAccess},
FusedIterator, InPlaceIterable, TrustedLen,
},
ops::{Add, AddAssign, Try},
};
use crate::iter::adapters::{zip::try_get_unchecked, SourceIter, TrustedRandomAccess};
use crate::iter::{FusedIterator, InPlaceIterable, TrustedLen};
use crate::ops::{Add, AddAssign, Try};
/// An iterator that yields the current count and the element during iteration.
///

View File

@ -1,8 +1,6 @@
use crate::{
fmt,
iter::{adapters::SourceIter, FusedIterator, InPlaceIterable},
ops::Try,
};
use crate::fmt;
use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable};
use crate::ops::Try;
/// An iterator that filters the elements of `iter` with `predicate`.
///

View File

@ -1,9 +1,6 @@
use crate::{
fmt,
iter::{adapters::SourceIter, FusedIterator, InPlaceIterable},
ops::ControlFlow,
ops::Try,
};
use crate::fmt;
use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable};
use crate::ops::{ControlFlow, Try};
/// An iterator that uses `f` to both filter and map elements from `iter`.
///

View File

@ -1,8 +1,6 @@
use crate::{
fmt,
iter::{DoubleEndedIterator, Fuse, FusedIterator, Iterator, Map},
ops::Try,
};
use crate::fmt;
use crate::iter::{DoubleEndedIterator, Fuse, FusedIterator, Iterator, Map};
use crate::ops::Try;
/// An iterator that maps each element to an iterator, and yields the elements
/// of the produced iterators.

View File

@ -1,11 +1,7 @@
use crate::{
intrinsics,
iter::{
adapters::{zip::try_get_unchecked, InPlaceIterable, SourceIter},
DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator, TrustedRandomAccess,
},
ops::Try,
};
use crate::intrinsics;
use crate::iter::adapters::{zip::try_get_unchecked, InPlaceIterable, SourceIter};
use crate::iter::{DoubleEndedIterator, ExactSizeIterator, FusedIterator, TrustedRandomAccess};
use crate::ops::Try;
/// An iterator that yields `None` forever after the underlying iterator
/// yields `None` once.

View File

@ -1,8 +1,6 @@
use crate::{
fmt,
iter::{adapters::SourceIter, FusedIterator, InPlaceIterable},
ops::Try,
};
use crate::fmt;
use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable};
use crate::ops::Try;
/// An iterator that calls a function with a reference to each element before
/// yielding it.

View File

@ -1,11 +1,7 @@
use crate::{
fmt,
iter::{
adapters::{zip::try_get_unchecked, SourceIter, TrustedRandomAccess},
FusedIterator, InPlaceIterable, TrustedLen,
},
ops::Try,
};
use crate::fmt;
use crate::iter::adapters::{zip::try_get_unchecked, SourceIter, TrustedRandomAccess};
use crate::iter::{FusedIterator, InPlaceIterable, TrustedLen};
use crate::ops::Try;
/// An iterator that maps the values of `iter` with `f`.
///

View File

@ -1,8 +1,6 @@
use crate::{
fmt,
iter::{adapters::SourceIter, InPlaceIterable},
ops::{ControlFlow, Try},
};
use crate::fmt;
use crate::iter::{adapters::SourceIter, InPlaceIterable};
use crate::ops::{ControlFlow, Try};
/// An iterator that only accepts elements while `predicate` returns `Some(_)`.
///

View File

@ -1,7 +1,5 @@
use crate::{
iter::{InPlaceIterable, Iterator},
ops::{ControlFlow, Try},
};
use crate::iter::{InPlaceIterable, Iterator};
use crate::ops::{ControlFlow, Try};
mod chain;
mod cloned;

View File

@ -1,7 +1,5 @@
use crate::{
iter::{adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedLen},
ops::Try,
};
use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedLen};
use crate::ops::Try;
/// An iterator with a `peek()` that returns an optional reference to the next
/// element.

View File

@ -1,7 +1,5 @@
use crate::{
iter::{FusedIterator, TrustedLen},
ops::Try,
};
use crate::iter::{FusedIterator, TrustedLen};
use crate::ops::Try;
/// A double-ended iterator with the direction inverted.
///

View File

@ -1,8 +1,6 @@
use crate::{
fmt,
iter::{adapters::SourceIter, InPlaceIterable},
ops::{ControlFlow, Try},
};
use crate::fmt;
use crate::iter::{adapters::SourceIter, InPlaceIterable};
use crate::ops::{ControlFlow, Try};
/// An iterator to maintain state while iterating another iterator.
///

View File

@ -1,7 +1,5 @@
use crate::{
iter::{adapters::SourceIter, FusedIterator, InPlaceIterable},
ops::{ControlFlow, Try},
};
use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable};
use crate::ops::{ControlFlow, Try};
/// An iterator that skips over `n` elements of `iter`.
///

View File

@ -1,8 +1,6 @@
use crate::{
fmt,
iter::{adapters::SourceIter, FusedIterator, InPlaceIterable},
ops::Try,
};
use crate::fmt;
use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable};
use crate::ops::Try;
/// An iterator that rejects elements while `predicate` returns `true`.
///

View File

@ -1,8 +1,6 @@
use crate::{
cmp,
iter::{adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedLen},
ops::{ControlFlow, Try},
};
use crate::cmp;
use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable, TrustedLen};
use crate::ops::{ControlFlow, Try};
/// An iterator that only iterates over the first `n` iterations of `iter`.
///

View File

@ -1,8 +1,6 @@
use crate::{
fmt,
iter::{adapters::SourceIter, FusedIterator, InPlaceIterable},
ops::{ControlFlow, Try},
};
use crate::fmt;
use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable};
use crate::ops::{ControlFlow, Try};
/// An iterator that only accepts elements while `predicate` returns `true`.
///

View File

@ -1,11 +1,7 @@
use crate::{
cmp,
fmt::{self, Debug},
iter::{
DoubleEndedIterator, ExactSizeIterator, FusedIterator, InPlaceIterable, Iterator,
SourceIter, TrustedLen,
},
};
use crate::cmp;
use crate::fmt::{self, Debug};
use crate::iter::{DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator};
use crate::iter::{InPlaceIterable, SourceIter, TrustedLen};
/// An iterator that iterates two other iterators simultaneously.
///

View File

@ -1,8 +1,6 @@
use crate::{
fmt,
iter::{FusedIterator, TrustedLen},
marker,
};
use crate::fmt;
use crate::iter::{FusedIterator, TrustedLen};
use crate::marker;
/// Creates an iterator that yields nothing.
///