@@ -1167,13 +1167,23 @@ forward_iterator! { SplitNMut: T, &'a mut [T] }
1167
1167
forward_iterator ! { RSplitNMut : T , & ' a mut [ T ] }
1168
1168
1169
1169
/// An iterator over overlapping subslices of length `size`.
1170
- #[ derive( Clone ) ]
1171
1170
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1172
1171
pub struct Windows < ' a , T : ' a > {
1173
1172
v : & ' a [ T ] ,
1174
1173
size : usize
1175
1174
}
1176
1175
1176
+ // FIXME(#19839) Remove in favor of `#[derive(Clone)]`
1177
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
1178
+ impl < ' a , T > Clone for Windows < ' a , T > {
1179
+ fn clone ( & self ) -> Windows < ' a , T > {
1180
+ Windows {
1181
+ v : self . v ,
1182
+ size : self . size ,
1183
+ }
1184
+ }
1185
+ }
1186
+
1177
1187
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1178
1188
impl < ' a , T > Iterator for Windows < ' a , T > {
1179
1189
type Item = & ' a [ T ] ;
@@ -1239,13 +1249,23 @@ impl<'a, T> RandomAccessIterator for Windows<'a, T> {
1239
1249
///
1240
1250
/// When the slice len is not evenly divided by the chunk size, the last slice
1241
1251
/// of the iteration will be the remainder.
1242
- #[ derive( Clone ) ]
1243
1252
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1244
1253
pub struct Chunks < ' a , T : ' a > {
1245
1254
v : & ' a [ T ] ,
1246
1255
size : usize
1247
1256
}
1248
1257
1258
+ // FIXME(#19839) Remove in favor of `#[derive(Clone)]`
1259
+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
1260
+ impl < ' a , T > Clone for Chunks < ' a , T > {
1261
+ fn clone ( & self ) -> Chunks < ' a , T > {
1262
+ Chunks {
1263
+ v : self . v ,
1264
+ size : self . size ,
1265
+ }
1266
+ }
1267
+ }
1268
+
1249
1269
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1250
1270
impl < ' a , T > Iterator for Chunks < ' a , T > {
1251
1271
type Item = & ' a [ T ] ;
0 commit comments