@@ -1110,12 +1110,13 @@ pub trait Itertools : Iterator {
1110
1110
/// ```
1111
1111
/// use itertools::Itertools;
1112
1112
///
1113
- /// let data = vec![1., 1., 2., 3., 3., 2., 2. ];
1113
+ /// let data = vec!['a', 'a', 'b', 'c', 'c', 'b', 'b' ];
1114
1114
/// itertools::assert_equal(data.into_iter().dedup_with_count(),
1115
- /// vec![(2, 1. ), (1, 2. ), (2, 3. ), (2, 2. )]);
1115
+ /// vec![(2, 'a' ), (1, 'b' ), (2, 'c' ), (2, 'b' )]);
1116
1116
/// ```
1117
1117
fn dedup_with_count ( self ) -> DedupWithCount < Self >
1118
- where Self : Sized ,
1118
+ where
1119
+ Self : Sized ,
1119
1120
{
1120
1121
adaptors:: dedup_with_count ( self )
1121
1122
}
@@ -1132,13 +1133,14 @@ pub trait Itertools : Iterator {
1132
1133
/// ```
1133
1134
/// use itertools::Itertools;
1134
1135
///
1135
- /// let data = vec![(0, 1. ), (1, 1. ), (0, 2. ), (0, 3. ), (1, 3. ), (1, 2. ), (2, 2. )];
1136
+ /// let data = vec![(0, 'a' ), (1, 'a' ), (0, 'b' ), (0, 'c' ), (1, 'c' ), (1, 'b' ), (2, 'b' )];
1136
1137
/// itertools::assert_equal(data.into_iter().dedup_by_with_count(|x, y| x.1 == y.1),
1137
- /// vec![(2, (0, 1. )), (1, (0, 2. )), (2, (0, 3. )), (2, (1, 2. ))]);
1138
+ /// vec![(2, (0, 'a' )), (1, (0, 'b' )), (2, (0, 'c' )), (2, (1, 'b' ))]);
1138
1139
/// ```
1139
1140
fn dedup_by_with_count < Cmp > ( self , cmp : Cmp ) -> DedupByWithCount < Self , Cmp >
1140
- where Self : Sized ,
1141
- Cmp : FnMut ( & Self :: Item , & Self :: Item ) -> bool ,
1141
+ where
1142
+ Self : Sized ,
1143
+ Cmp : FnMut ( & Self :: Item , & Self :: Item ) -> bool ,
1142
1144
{
1143
1145
adaptors:: dedup_by_with_count ( self , cmp)
1144
1146
}
0 commit comments