@@ -2976,7 +2976,6 @@ unsafe impl<'a, T> TrustedRandomAccess for IterMut<'a, T> {
2976
2976
/// [`group_by`]: ../../std/primitive.slice.html#method.group_by
2977
2977
/// [slices]: ../../std/primitive.slice.html
2978
2978
#[ unstable( feature = "slice_group_by" , issue = "none" ) ]
2979
- #[ derive( Debug ) ] // FIXME implement Debug to be more user friendly
2980
2979
pub struct GroupBy < ' a , T : ' a , P > {
2981
2980
slice : & ' a [ T ] ,
2982
2981
predicate : P ,
@@ -3048,6 +3047,13 @@ where
3048
3047
#[ unstable( feature = "slice_group_by" , issue = "none" ) ]
3049
3048
impl < ' a , T : ' a , P > FusedIterator for GroupBy < ' a , T , P > where P : FnMut ( & T , & T ) -> bool { }
3050
3049
3050
+ #[ unstable( feature = "slice_group_by" , issue = "none" ) ]
3051
+ impl < ' a , T : ' a + fmt:: Debug , P > fmt:: Debug for GroupBy < ' a , T , P > {
3052
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
3053
+ f. debug_struct ( "GroupBy" ) . field ( "slice" , & self . slice ) . finish ( )
3054
+ }
3055
+ }
3056
+
3051
3057
/// An iterator over slice in (non-overlapping) mutable chunks separated
3052
3058
/// by a predicate.
3053
3059
///
@@ -3056,7 +3062,6 @@ impl<'a, T: 'a, P> FusedIterator for GroupBy<'a, T, P> where P: FnMut(&T, &T) ->
3056
3062
/// [`group_by_mut`]: ../../std/primitive.slice.html#method.group_by_mut
3057
3063
/// [slices]: ../../std/primitive.slice.html
3058
3064
#[ unstable( feature = "slice_group_by" , issue = "none" ) ]
3059
- #[ derive( Debug ) ] // FIXME implement Debug to be more user friendly
3060
3065
pub struct GroupByMut < ' a , T : ' a , P > {
3061
3066
slice : & ' a mut [ T ] ,
3062
3067
predicate : P ,
@@ -3129,3 +3134,10 @@ where
3129
3134
3130
3135
#[ unstable( feature = "slice_group_by" , issue = "none" ) ]
3131
3136
impl < ' a , T : ' a , P > FusedIterator for GroupByMut < ' a , T , P > where P : FnMut ( & T , & T ) -> bool { }
3137
+
3138
+ #[ unstable( feature = "slice_group_by" , issue = "none" ) ]
3139
+ impl < ' a , T : ' a + fmt:: Debug , P > fmt:: Debug for GroupByMut < ' a , T , P > {
3140
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
3141
+ f. debug_struct ( "GroupByMut" ) . field ( "slice" , & self . slice ) . finish ( )
3142
+ }
3143
+ }
0 commit comments