mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-23 23:56:34 +11:00
Merge pull request #277 from gwilymk/deny-missing-docs-in-hashmap
Deny missing docs in HashMap and document remaining two public structs
This commit is contained in:
commit
14f42670d2
1 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
#![deny(missing_docs)]
|
||||||
//! A lot of the documentation for this module was copied straight out of the rust
|
//! A lot of the documentation for this module was copied straight out of the rust
|
||||||
//! standard library. The implementation however is not.
|
//! standard library. The implementation however is not.
|
||||||
use alloc::vec::Vec;
|
use alloc::vec::Vec;
|
||||||
|
@ -291,6 +292,10 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// An iterator over entries of a [`HashMap`]
|
||||||
|
///
|
||||||
|
/// This struct is created using the `into_iter()` method on [`HashMap`]. See its
|
||||||
|
/// documentation for more.
|
||||||
pub struct Iter<'a, K: 'a, V: 'a> {
|
pub struct Iter<'a, K: 'a, V: 'a> {
|
||||||
map: &'a HashMap<K, V>,
|
map: &'a HashMap<K, V>,
|
||||||
at: usize,
|
at: usize,
|
||||||
|
@ -324,6 +329,10 @@ impl<'a, K, V> IntoIterator for &'a HashMap<K, V> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// An iterator over entries of a [`HashMap`]
|
||||||
|
///
|
||||||
|
/// This struct is created using the `into_iter()` method on [`HashMap`] as part of its implementation
|
||||||
|
/// of the IntoIterator trait.
|
||||||
pub struct IterOwned<K, V> {
|
pub struct IterOwned<K, V> {
|
||||||
map: HashMap<K, V>,
|
map: HashMap<K, V>,
|
||||||
at: usize,
|
at: usize,
|
||||||
|
@ -348,6 +357,10 @@ impl<K, V> Iterator for IterOwned<K, V> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// An iterator over entries of a [`HashMap`]
|
||||||
|
///
|
||||||
|
/// This struct is created using the `into_iter()` method on [`HashMap`] as part of its implementation
|
||||||
|
/// of the IntoIterator trait.
|
||||||
impl<K, V> IntoIterator for HashMap<K, V> {
|
impl<K, V> IntoIterator for HashMap<K, V> {
|
||||||
type Item = (K, V);
|
type Item = (K, V);
|
||||||
type IntoIter = IterOwned<K, V>;
|
type IntoIter = IterOwned<K, V>;
|
||||||
|
|
Loading…
Add table
Reference in a new issue