@@ -147,28 +147,38 @@ impl<K: Eq, V> LinearMap<K, V> {
147
147
///
148
148
/// All key-value pairs are removed even if the iterator is not exhausted. However, the
149
149
/// behavior of this method is unspecified if the iterator is leaked.
150
+ ///
151
+ /// The iterator's item type is `(K, V)`.
150
152
pub fn drain ( & mut self ) -> Drain < K , V > {
151
153
Drain { iter : self . storage . drain ( ..) }
152
154
}
153
155
154
156
/// Returns an iterator yielding references to the map's keys and their corresponding values in
155
157
/// arbitrary order.
158
+ ///
159
+ /// The iterator's item type is `(&K, &V)`.
156
160
pub fn iter ( & self ) -> Iter < K , V > {
157
161
Iter { iter : self . storage . iter ( ) }
158
162
}
159
163
160
164
/// Returns an iterator yielding references to the map's keys and mutable references to their
161
165
/// corresponding values in arbitrary order.
166
+ ///
167
+ /// The iterator's item type is `(&K, &mut V)`.
162
168
pub fn iter_mut ( & mut self ) -> IterMut < K , V > {
163
169
IterMut { iter : self . storage . iter_mut ( ) }
164
170
}
165
171
166
172
/// Returns an iterator yielding references to the map's keys in arbitrary order.
173
+ ///
174
+ /// The iterator's item type is `&K`.
167
175
pub fn keys ( & self ) -> Keys < K , V > {
168
176
Keys { iter : self . iter ( ) }
169
177
}
170
178
171
179
/// Returns an iterator yielding references to the map's values in arbitrary order.
180
+ ///
181
+ /// The iterator's item type is `&V`.
172
182
pub fn values ( & self ) -> Values < K , V > {
173
183
Values { iter : self . iter ( ) }
174
184
}
0 commit comments