Skip to content

Commit

Permalink
Improve iter method documentation. Push version to 0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
JustForFun88 committed Apr 4, 2022
1 parent 12ce963 commit cbbd62d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

All notable changes to this project will be documented in this file.

## [v0.4.1] - 2022-04-04

### Added

Nothing

### Changed

Improved **`iter`** `DHashMap` method documentation.

### Removed

Nothign

### Fixed

Nothing

## [v0.4.0] - 2022-04-04

### Added
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "double-map"
version = "0.4.0"
version = "0.4.1"
authors = ["Alisher Galiev <[email protected]>"]
description = "A HashMap with double key to single data/value"
edition = "2021"
Expand Down
15 changes: 15 additions & 0 deletions src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,21 @@ impl<K1, K2, V, S> DHashMap<K1, K2, V, S> {
/// An iterator visiting all keys-value tuples in arbitrary order.
/// The iterator element is tuple of type `(&'a K1, &'a K2, &'a V)`.
///
/// # Note
///
/// Internally [`DHashMap`] use two [`HashMap`]. One of type
/// `HashMap<K1, (K2, V)>` to hold the `(K2, V)` tuple, and second one of type
/// `HashMap<K2, K1>` just for holding the primary key of type `K1`.
///
/// Created iterator iterate only through first [`HashMap`] of type `HashMap<K1, (K2, V)>`.
/// So that, if you previously used ['insert_unchecked'] method,
/// this method can return false second keys (key #2) in case of **unsynchronization**
/// between first keys of type `K1` and second keys of type `K2`. See ['insert_unchecked']
/// method documentation for more.
///
/// [`HashMap`]: (`std::collections::HashMap`)
/// ['insert_unchecked']: (DHashMap::insert_unchecked)
///
/// # Examples
///
/// ```
Expand Down

0 comments on commit cbbd62d

Please sign in to comment.