Skip to content

Commit

Permalink
#3 doc
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Apr 16, 2023
1 parent 55b97eb commit b24e6c7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
#![allow(clippy::multiple_inherent_impl)]
#![allow(clippy::multiple_crate_versions)]

mod serialization;
mod pair;
mod map;
mod pair;
mod serialization;

/// A pair in the Map.
#[derive(Clone)]
Expand Down
4 changes: 2 additions & 2 deletions src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// SOFTWARE.

use crate::Pair::{Absent, Present};
use crate::{Map, MapIntoIter, Pair, MapIter};
use crate::{Map, MapIntoIter, MapIter, Pair};

impl<'a, K: Clone, V: Clone, const N: usize> Iterator for MapIter<'a, K, V, N> {
type Item = (&'a K, &'a V);
Expand Down Expand Up @@ -151,7 +151,7 @@ impl<K: Copy + PartialEq, V: Clone, const N: usize> Map<K, V, N> {
}
}

/// Insert a single pair into it.
/// Insert a single pair into the map.
///
/// # Panics
///
Expand Down
3 changes: 1 addition & 2 deletions src/pair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

use crate::Pair;
use crate::Pair::{Absent, Present};
use crate::{Pair};

impl<K, V> Default for Pair<K, V> {
fn default() -> Self {
Expand Down Expand Up @@ -57,4 +57,3 @@ use anyhow::Result;
fn boom() -> Result<()> {
Ok(())
}

3 changes: 1 addition & 2 deletions src/serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

use crate::{Map};
use crate::Map;
use serde::de::{MapAccess, Visitor};
use serde::ser::SerializeMap;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
Expand Down Expand Up @@ -89,4 +89,3 @@ fn serialize_and_deserialize() -> Result<()> {
assert_eq!(42, after.into_iter().next().unwrap().1);
Ok(())
}

0 comments on commit b24e6c7

Please sign in to comment.