Skip to content

Commit

Permalink
Merge pull request #264 from cuviper/equivalent
Browse files Browse the repository at this point in the history
pub use equivalent::Equivalent;
  • Loading branch information
cuviper committed Jun 23, 2023
2 parents bb48357 + 677c605 commit 74e14da
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 33 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Expand Up @@ -15,6 +15,8 @@ rust-version = "1.64"
bench = false

[dependencies]
equivalent = { version = "1.0", default-features = false }

arbitrary = { version = "1.0", optional = true, default-features = false }
quickcheck = { version = "1.0", optional = true, default-features = false }
serde = { version = "1.0", optional = true, default-features = false }
Expand Down
3 changes: 3 additions & 0 deletions RELEASES.md
Expand Up @@ -26,6 +26,9 @@
However, exactness only applies to the direct capacity for items, while the
raw hash table still follows its own rules for capacity and load factor.

- The `Equivalent` trait is now re-exported from the `equivalent` crate,
intended as a common base to allow types to work with multiple map types.

- The `hashbrown` dependency has been updated to version 0.14.

- The `serde_seq` module has been moved from the crate root to below the
Expand Down
27 changes: 0 additions & 27 deletions src/equivalent.rs

This file was deleted.

3 changes: 1 addition & 2 deletions src/lib.rs
Expand Up @@ -117,7 +117,6 @@ use alloc::vec::{self, Vec};
mod arbitrary;
#[macro_use]
mod macros;
mod equivalent;
mod mutable_keys;
#[cfg(feature = "serde")]
#[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
Expand All @@ -136,9 +135,9 @@ mod rayon;
#[cfg(feature = "rustc-rayon")]
mod rustc;

pub use crate::equivalent::Equivalent;
pub use crate::map::IndexMap;
pub use crate::set::IndexSet;
pub use equivalent::Equivalent;

// shared private items

Expand Down
3 changes: 1 addition & 2 deletions src/map.rs
Expand Up @@ -33,9 +33,8 @@ use alloc::vec::Vec;
use std::collections::hash_map::RandomState;

use self::core::IndexMapCore;
use crate::equivalent::Equivalent;
use crate::util::{third, try_simplify_range};
use crate::{Bucket, Entries, HashValue, TryReserveError};
use crate::{Bucket, Entries, Equivalent, HashValue, TryReserveError};

/// A hash table where the iteration order of the key-value pairs is independent
/// of the hash values of the keys.
Expand Down
3 changes: 1 addition & 2 deletions src/map/core.rs
Expand Up @@ -17,9 +17,8 @@ use core::fmt;
use core::mem;
use core::ops::RangeBounds;

use crate::equivalent::Equivalent;
use crate::util::simplify_range;
use crate::{Bucket, Entries, HashValue};
use crate::{Bucket, Entries, Equivalent, HashValue};

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

0 comments on commit 74e14da

Please sign in to comment.