Skip to content

Commit 74e14da

Browse files
authored
Merge pull request #264 from cuviper/equivalent
pub use equivalent::Equivalent;
2 parents bb48357 + 677c605 commit 74e14da

File tree

6 files changed

+8
-33
lines changed

6 files changed

+8
-33
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ rust-version = "1.64"
1515
bench = false
1616

1717
[dependencies]
18+
equivalent = { version = "1.0", default-features = false }
19+
1820
arbitrary = { version = "1.0", optional = true, default-features = false }
1921
quickcheck = { version = "1.0", optional = true, default-features = false }
2022
serde = { version = "1.0", optional = true, default-features = false }

RELEASES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
However, exactness only applies to the direct capacity for items, while the
2727
raw hash table still follows its own rules for capacity and load factor.
2828

29+
- The `Equivalent` trait is now re-exported from the `equivalent` crate,
30+
intended as a common base to allow types to work with multiple map types.
31+
2932
- The `hashbrown` dependency has been updated to version 0.14.
3033

3134
- The `serde_seq` module has been moved from the crate root to below the

src/equivalent.rs

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ use alloc::vec::{self, Vec};
117117
mod arbitrary;
118118
#[macro_use]
119119
mod macros;
120-
mod equivalent;
121120
mod mutable_keys;
122121
#[cfg(feature = "serde")]
123122
#[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
@@ -136,9 +135,9 @@ mod rayon;
136135
#[cfg(feature = "rustc-rayon")]
137136
mod rustc;
138137

139-
pub use crate::equivalent::Equivalent;
140138
pub use crate::map::IndexMap;
141139
pub use crate::set::IndexSet;
140+
pub use equivalent::Equivalent;
142141

143142
// shared private items
144143

src/map.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ use alloc::vec::Vec;
3333
use std::collections::hash_map::RandomState;
3434

3535
use self::core::IndexMapCore;
36-
use crate::equivalent::Equivalent;
3736
use crate::util::{third, try_simplify_range};
38-
use crate::{Bucket, Entries, HashValue, TryReserveError};
37+
use crate::{Bucket, Entries, Equivalent, HashValue, TryReserveError};
3938

4039
/// A hash table where the iteration order of the key-value pairs is independent
4140
/// of the hash values of the keys.

src/map/core.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ use core::fmt;
1717
use core::mem;
1818
use core::ops::RangeBounds;
1919

20-
use crate::equivalent::Equivalent;
2120
use crate::util::simplify_range;
22-
use crate::{Bucket, Entries, HashValue};
21+
use crate::{Bucket, Entries, Equivalent, HashValue};
2322

2423
/// Core of the map that does not depend on S
2524
pub(crate) struct IndexMapCore<K, V> {

0 commit comments

Comments
 (0)