Skip to content

Commit 0416108

Browse files
committed
impl Debug (1) derive where possible and sensible
1 parent 4ac4f43 commit 0416108

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

src/adaptors/coalesce.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ where
137137
}
138138
}
139139

140-
#[derive(Clone)]
140+
#[derive(Clone, Debug)]
141141
pub struct DedupEq;
142142

143143
impl<T: PartialEq> DedupPredicate<T> for DedupEq {
@@ -186,7 +186,7 @@ where
186186
pub type DedupByWithCount<I, Pred> =
187187
CoalesceBy<I, DedupPredWithCount2CoalescePred<Pred>, (usize, <I as Iterator>::Item)>;
188188

189-
#[derive(Clone)]
189+
#[derive(Clone, Debug)]
190190
pub struct DedupPredWithCount2CoalescePred<DP>(DP);
191191

192192
impl<DP, T> CoalescePredicate<T, (usize, T)> for DedupPredWithCount2CoalescePred<DP>

src/adaptors/map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::iter::FromIterator;
22
use std::marker::PhantomData;
33

4-
#[derive(Clone)]
4+
#[derive(Clone, Debug)]
55
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
66
pub struct MapSpecialCase<I, F> {
77
iter: I,
@@ -108,7 +108,7 @@ impl<T: Into<U>, U> MapSpecialCaseFn<T> for MapSpecialCaseFnInto<U> {
108108
}
109109
}
110110

111-
#[derive(Clone)]
111+
#[derive(Clone, Debug)]
112112
pub struct MapSpecialCaseFnInto<U>(PhantomData<U>);
113113

114114
/// Create a new [`MapInto`] iterator.

src/adaptors/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ pub trait MergePredicate<T> {
477477
fn merge_pred(&mut self, a: &T, b: &T) -> bool;
478478
}
479479

480-
#[derive(Clone)]
480+
#[derive(Clone, Debug)]
481481
pub struct MergeLte;
482482

483483
impl<T: PartialOrd> MergePredicate<T> for MergeLte {

src/duplicates_impl.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ mod private {
122122
}
123123

124124
/// Apply the identity function to elements before checking them for equality.
125+
#[derive(Debug)]
125126
pub struct ById;
126127
impl<V> KeyMethod<V, V> for ById {
127128
type Container = JustValue<V>;
@@ -152,6 +153,7 @@ mod private {
152153
fn value(self) -> V;
153154
}
154155

156+
#[derive(Debug)]
155157
pub struct KeyValue<K, V>(K, V);
156158
impl<K, V> KeyXorValue<K, V> for KeyValue<K, V> {
157159
fn key_ref(&self) -> &K {
@@ -165,6 +167,7 @@ mod private {
165167
}
166168
}
167169

170+
#[derive(Debug)]
168171
pub struct JustValue<V>(V);
169172
impl<V> KeyXorValue<V, V> for JustValue<V> {
170173
fn key_ref(&self) -> &V {

src/kmerge_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ pub trait KMergePredicate<T> {
111111
fn kmerge_pred(&mut self, a: &T, b: &T) -> bool;
112112
}
113113

114-
#[derive(Clone)]
114+
#[derive(Clone, Debug)]
115115
pub struct KMergeByLt;
116116

117117
impl<T: PartialOrd> KMergePredicate<T> for KMergeByLt {

src/tuple_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl<T> ExactSizeIterator for TupleBuffer<T>
7777
/// An iterator that groups the items in tuples of a specific size.
7878
///
7979
/// See [`.tuples()`](crate::Itertools::tuples) for more information.
80-
#[derive(Clone)]
80+
#[derive(Clone, Debug)]
8181
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
8282
pub struct Tuples<I, T>
8383
where I: Iterator<Item = T::Item>,

0 commit comments

Comments
 (0)