@@ -14,27 +14,28 @@ pub mod iter;
14
14
mod lanes;
15
15
mod windows;
16
16
17
+ #[ cfg( not( feature = "std" ) ) ]
18
+ use alloc:: vec:: Vec ;
17
19
use std:: iter:: FromIterator ;
18
20
use std:: marker:: PhantomData ;
19
21
use std:: ptr;
20
- #[ cfg( not( feature = "std" ) ) ]
21
- use alloc:: vec:: Vec ;
22
22
23
23
use crate :: Ix1 ;
24
24
25
25
use super :: { ArrayBase , ArrayView , ArrayViewMut , Axis , Data , NdProducer , RemoveAxis } ;
26
26
use super :: { Dimension , Ix , Ixs } ;
27
27
28
28
pub use self :: chunks:: { ExactChunks , ExactChunksIter , ExactChunksIterMut , ExactChunksMut } ;
29
+ pub use self :: into_iter:: IntoIter ;
29
30
pub use self :: lanes:: { Lanes , LanesMut } ;
30
31
pub use self :: windows:: Windows ;
31
- pub use self :: into_iter:: IntoIter ;
32
32
33
33
use std:: slice:: { self , Iter as SliceIter , IterMut as SliceIterMut } ;
34
34
35
35
/// Base for iterators over all axes.
36
36
///
37
37
/// Iterator element type is `*mut A`.
38
+ #[ derive( Debug ) ]
38
39
pub struct Baseiter < A , D > {
39
40
ptr : * mut A ,
40
41
dim : D ,
@@ -306,7 +307,7 @@ where
306
307
}
307
308
}
308
309
309
- #[ derive( Clone ) ]
310
+ #[ derive( Clone , Debug ) ]
310
311
pub enum ElementsRepr < S , C > {
311
312
Slice ( S ) ,
312
313
Counted ( C ) ,
@@ -317,11 +318,19 @@ pub enum ElementsRepr<S, C> {
317
318
/// Iterator element type is `&'a A`.
318
319
///
319
320
/// See [`.iter()`](ArrayBase::iter) for more information.
321
+ #[ derive( Debug ) ]
320
322
pub struct Iter < ' a , A , D > {
321
323
inner : ElementsRepr < SliceIter < ' a , A > , ElementsBase < ' a , A , D > > ,
322
324
}
323
325
326
+ // impl<'a, A, D> fmt::Debug for Iter<'a, A, D> {
327
+ // fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
328
+ // f.debug_struct("Iter").field("inner", &self.inner).finish()
329
+ // }
330
+ // }
331
+
324
332
/// Counted read only iterator
333
+ #[ derive( Debug ) ]
325
334
pub struct ElementsBase < ' a , A , D > {
326
335
inner : Baseiter < A , D > ,
327
336
life : PhantomData < & ' a A > ,
@@ -332,13 +341,15 @@ pub struct ElementsBase<'a, A, D> {
332
341
/// Iterator element type is `&'a mut A`.
333
342
///
334
343
/// See [`.iter_mut()`](ArrayBase::iter_mut) for more information.
344
+ #[ derive( Debug ) ]
335
345
pub struct IterMut < ' a , A , D > {
336
346
inner : ElementsRepr < SliceIterMut < ' a , A > , ElementsBaseMut < ' a , A , D > > ,
337
347
}
338
348
339
349
/// An iterator over the elements of an array.
340
350
///
341
351
/// Iterator element type is `&'a mut A`.
352
+ #[ derive( Debug ) ]
342
353
pub struct ElementsBaseMut < ' a , A , D > {
343
354
inner : Baseiter < A , D > ,
344
355
life : PhantomData < & ' a mut A > ,
0 commit comments