Skip to content

Commit ec0e477

Browse files
committed
Add Clone, Debug and Default impls to map iterators
1 parent c1826eb commit ec0e477

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/map.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,7 @@ impl<'a> IntoIterator for &'a Map<String, Value> {
10561056
}
10571057

10581058
/// An iterator over a serde_json::Map's entries.
1059+
#[derive(Clone, Debug, Default)]
10591060
pub struct Iter<'a> {
10601061
iter: IterImpl<'a>,
10611062
}
@@ -1081,6 +1082,7 @@ impl<'a> IntoIterator for &'a mut Map<String, Value> {
10811082
}
10821083

10831084
/// A mutable iterator over a serde_json::Map's entries.
1085+
#[derive(Debug, Default)]
10841086
pub struct IterMut<'a> {
10851087
iter: IterMutImpl<'a>,
10861088
}
@@ -1106,6 +1108,7 @@ impl IntoIterator for Map<String, Value> {
11061108
}
11071109

11081110
/// An owning iterator over a serde_json::Map's entries.
1111+
#[derive(Debug, Default)]
11091112
pub struct IntoIter {
11101113
iter: IntoIterImpl,
11111114
}
@@ -1120,6 +1123,7 @@ delegate_iterator!((IntoIter) => (String, Value));
11201123
//////////////////////////////////////////////////////////////////////////////
11211124

11221125
/// An iterator over a serde_json::Map's keys.
1126+
#[derive(Clone, Debug, Default)]
11231127
pub struct Keys<'a> {
11241128
iter: KeysImpl<'a>,
11251129
}
@@ -1134,6 +1138,7 @@ delegate_iterator!((Keys<'a>) => &'a String);
11341138
//////////////////////////////////////////////////////////////////////////////
11351139

11361140
/// An iterator over a serde_json::Map's values.
1141+
#[derive(Clone, Debug, Default)]
11371142
pub struct Values<'a> {
11381143
iter: ValuesImpl<'a>,
11391144
}
@@ -1148,6 +1153,7 @@ delegate_iterator!((Values<'a>) => &'a Value);
11481153
//////////////////////////////////////////////////////////////////////////////
11491154

11501155
/// A mutable iterator over a serde_json::Map's values.
1156+
#[derive(Debug, Default)]
11511157
pub struct ValuesMut<'a> {
11521158
iter: ValuesMutImpl<'a>,
11531159
}
@@ -1162,6 +1168,7 @@ delegate_iterator!((ValuesMut<'a>) => &'a mut Value);
11621168
//////////////////////////////////////////////////////////////////////////////
11631169

11641170
/// An owning iterator over a serde_json::Map's values.
1171+
#[derive(Debug, Default)]
11651172
pub struct IntoValues {
11661173
iter: IntoValuesImpl,
11671174
}

0 commit comments

Comments
 (0)