Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pub use equivalent::Equivalent; #264

Merged
merged 2 commits into from
Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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