@@ -99,12 +99,12 @@ impl Debug for Document {
99
99
}
100
100
101
101
/// An iterator over Document entries.
102
- pub struct DocumentIntoIterator {
102
+ pub struct IntoIter {
103
103
inner : indexmap:: map:: IntoIter < String , Bson > ,
104
104
}
105
105
106
106
/// An owning iterator over Document entries.
107
- pub struct DocumentIterator < ' a > {
107
+ pub struct Iter < ' a > {
108
108
inner : indexmap:: map:: Iter < ' a , String , Bson > ,
109
109
}
110
110
@@ -136,21 +136,21 @@ impl<'a> Iterator for Values<'a> {
136
136
137
137
impl IntoIterator for Document {
138
138
type Item = ( String , Bson ) ;
139
- type IntoIter = DocumentIntoIterator ;
139
+ type IntoIter = IntoIter ;
140
140
141
141
fn into_iter ( self ) -> Self :: IntoIter {
142
- DocumentIntoIterator {
142
+ IntoIter {
143
143
inner : self . inner . into_iter ( ) ,
144
144
}
145
145
}
146
146
}
147
147
148
148
impl < ' a > IntoIterator for & ' a Document {
149
149
type Item = ( & ' a String , & ' a Bson ) ;
150
- type IntoIter = DocumentIterator < ' a > ;
150
+ type IntoIter = Iter < ' a > ;
151
151
152
152
fn into_iter ( self ) -> Self :: IntoIter {
153
- DocumentIterator {
153
+ Iter {
154
154
inner : self . inner . iter ( ) ,
155
155
}
156
156
}
@@ -166,15 +166,15 @@ impl FromIterator<(String, Bson)> for Document {
166
166
}
167
167
}
168
168
169
- impl < ' a > Iterator for DocumentIntoIterator {
169
+ impl < ' a > Iterator for IntoIter {
170
170
type Item = ( String , Bson ) ;
171
171
172
172
fn next ( & mut self ) -> Option < ( String , Bson ) > {
173
173
self . inner . next ( )
174
174
}
175
175
}
176
176
177
- impl < ' a > Iterator for DocumentIterator < ' a > {
177
+ impl < ' a > Iterator for Iter < ' a > {
178
178
type Item = ( & ' a String , & ' a Bson ) ;
179
179
180
180
fn next ( & mut self ) -> Option < ( & ' a String , & ' a Bson ) > {
@@ -191,7 +191,7 @@ impl Document {
191
191
}
192
192
193
193
/// Gets an iterator over the entries of the map.
194
- pub fn iter ( & self ) -> DocumentIterator {
194
+ pub fn iter ( & self ) -> Iter {
195
195
self . into_iter ( )
196
196
}
197
197
0 commit comments