@@ -59,7 +59,6 @@ pub use self::MinMaxResult::*;
59
59
use clone:: Clone ;
60
60
use cmp;
61
61
use cmp:: Ord ;
62
- use kinds:: Copy ;
63
62
use mem;
64
63
use num:: { ToPrimitive , Int } ;
65
64
use ops:: { Add , Deref , FnMut } ;
@@ -1168,16 +1167,14 @@ impl<A, I> CloneIteratorExt for I where I: Iterator<A> + Clone {
1168
1167
}
1169
1168
1170
1169
/// An iterator that repeats endlessly
1171
- #[ deriving( Clone ) ]
1170
+ #[ deriving( Clone , Copy ) ]
1172
1171
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1173
1172
#[ stable]
1174
1173
pub struct Cycle < T > {
1175
1174
orig : T ,
1176
1175
iter : T ,
1177
1176
}
1178
1177
1179
- impl < T : Copy > Copy for Cycle < T > { }
1180
-
1181
1178
impl < A , T : Clone + Iterator < A > > Iterator < A > for Cycle < T > {
1182
1179
#[ inline]
1183
1180
fn next ( & mut self ) -> Option < A > {
@@ -1635,13 +1632,12 @@ impl<A, T: RandomAccessIterator<A>> RandomAccessIterator<(uint, A)> for Enumerat
1635
1632
/// An iterator with a `peek()` that returns an optional reference to the next element.
1636
1633
#[ must_use = "iterator adaptors are lazy and do nothing unless consumed" ]
1637
1634
#[ stable]
1635
+ #[ deriving( Copy ) ]
1638
1636
pub struct Peekable < A , T > {
1639
1637
iter : T ,
1640
1638
peeked : Option < A > ,
1641
1639
}
1642
1640
1643
- impl < T : Copy , A : Copy > Copy for Peekable < A , T > { }
1644
-
1645
1641
impl < A , T : Iterator < A > > Iterator < A > for Peekable < A , T > {
1646
1642
#[ inline]
1647
1643
fn next ( & mut self ) -> Option < A > {
@@ -2267,7 +2263,7 @@ impl<A, St, F> Iterator<A> for Unfold<A, St, F> where F: FnMut(&mut St) -> Optio
2267
2263
2268
2264
/// An infinite iterator starting at `start` and advancing by `step` with each
2269
2265
/// iteration
2270
- #[ deriving( Clone ) ]
2266
+ #[ deriving( Clone , Copy ) ]
2271
2267
#[ unstable = "may be renamed" ]
2272
2268
pub struct Counter < A > {
2273
2269
/// The current state the counter is at (next value to be yielded)
@@ -2276,8 +2272,6 @@ pub struct Counter<A> {
2276
2272
step : A ,
2277
2273
}
2278
2274
2279
- impl < A : Copy > Copy for Counter < A > { }
2280
-
2281
2275
/// Creates a new counter with the specified start/step
2282
2276
#[ inline]
2283
2277
#[ unstable = "may be renamed" ]
@@ -2301,16 +2295,14 @@ impl<A: Add<A, A> + Clone> Iterator<A> for Counter<A> {
2301
2295
}
2302
2296
2303
2297
/// An iterator over the range [start, stop)
2304
- #[ deriving( Clone ) ]
2298
+ #[ deriving( Clone , Copy ) ]
2305
2299
#[ unstable = "may be refactored due to numerics reform or ops reform" ]
2306
2300
pub struct Range < A > {
2307
2301
state : A ,
2308
2302
stop : A ,
2309
2303
one : A ,
2310
2304
}
2311
2305
2312
- impl < A : Copy > Copy for Range < A > { }
2313
-
2314
2306
/// Returns an iterator over the given range [start, stop) (that is, starting
2315
2307
/// at start (inclusive), and ending at stop (exclusive)).
2316
2308
///
0 commit comments