Renamed ClonableIterator to CloneableIterator
This commit is contained in:
parent
00d87e0d81
commit
32c480d63d
3 changed files with 6 additions and 6 deletions
|
@ -78,7 +78,7 @@ syn keyword rustTrait Default
|
||||||
syn keyword rustTrait Hash
|
syn keyword rustTrait Hash
|
||||||
syn keyword rustTrait FromStr
|
syn keyword rustTrait FromStr
|
||||||
syn keyword rustTrait FromIterator Extendable
|
syn keyword rustTrait FromIterator Extendable
|
||||||
syn keyword rustTrait Iterator DoubleEndedIterator RandomAccessIterator ClonableIterator
|
syn keyword rustTrait Iterator DoubleEndedIterator RandomAccessIterator CloneableIterator
|
||||||
syn keyword rustTrait OrdIterator MutableDoubleEndedIterator ExactSize
|
syn keyword rustTrait OrdIterator MutableDoubleEndedIterator ExactSize
|
||||||
syn keyword rustTrait Times
|
syn keyword rustTrait Times
|
||||||
|
|
||||||
|
|
|
@ -906,14 +906,14 @@ impl<A: Ord, T: Iterator<A>> OrdIterator<A> for T {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A trait for iterators that are clonable.
|
/// A trait for iterators that are cloneable.
|
||||||
pub trait ClonableIterator {
|
pub trait CloneableIterator {
|
||||||
/// Repeats an iterator endlessly
|
/// Repeats an iterator endlessly
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use std::iter::{ClonableIterator, count};
|
/// use std::iter::{CloneableIterator, count};
|
||||||
///
|
///
|
||||||
/// let a = count(1,1).take(1);
|
/// let a = count(1,1).take(1);
|
||||||
/// let mut cy = a.cycle();
|
/// let mut cy = a.cycle();
|
||||||
|
@ -923,7 +923,7 @@ pub trait ClonableIterator {
|
||||||
fn cycle(self) -> Cycle<Self>;
|
fn cycle(self) -> Cycle<Self>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<A, T: Clone + Iterator<A>> ClonableIterator for T {
|
impl<A, T: Clone + Iterator<A>> CloneableIterator for T {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn cycle(self) -> Cycle<T> {
|
fn cycle(self) -> Cycle<T> {
|
||||||
Cycle{orig: self.clone(), iter: self}
|
Cycle{orig: self.clone(), iter: self}
|
||||||
|
|
|
@ -55,7 +55,7 @@ pub use default::Default;
|
||||||
pub use from_str::FromStr;
|
pub use from_str::FromStr;
|
||||||
pub use hash::Hash;
|
pub use hash::Hash;
|
||||||
pub use iter::{FromIterator, Extendable};
|
pub use iter::{FromIterator, Extendable};
|
||||||
pub use iter::{Iterator, DoubleEndedIterator, RandomAccessIterator, ClonableIterator};
|
pub use iter::{Iterator, DoubleEndedIterator, RandomAccessIterator, CloneableIterator};
|
||||||
pub use iter::{OrdIterator, MutableDoubleEndedIterator, ExactSize};
|
pub use iter::{OrdIterator, MutableDoubleEndedIterator, ExactSize};
|
||||||
pub use num::Times;
|
pub use num::Times;
|
||||||
pub use num::{Algebraic, Trigonometric, Exponential, Hyperbolic};
|
pub use num::{Algebraic, Trigonometric, Exponential, Hyperbolic};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue