mirror of https://github.com/xacrimon/dashmap
fixer uppers
This commit is contained in:
parent
ef374938a5
commit
f167aec2b4
|
@ -19,9 +19,9 @@ no_std = ["hashbrown"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
num_cpus = "1.13.0"
|
num_cpus = "1.13.0"
|
||||||
serde = { version = "1.0.114", optional = true, features = ["derive"] }
|
serde = { version = "1.0.118", optional = true, features = ["derive"] }
|
||||||
cfg-if = "1.0.0"
|
cfg-if = "1.0.0"
|
||||||
hashbrown = { version = "0.8.0", optional = true }
|
hashbrown = { version = "0.9.1", optional = true }
|
||||||
rayon = { version = "1.5.0", optional = true }
|
rayon = { version = "1.5.0", optional = true }
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
|
|
|
@ -4,9 +4,9 @@ use crate::lock::{RwLockReadGuard, RwLockWriteGuard};
|
||||||
use crate::t::Map;
|
use crate::t::Map;
|
||||||
use crate::util::SharedValue;
|
use crate::util::SharedValue;
|
||||||
use crate::{DashMap, HashMap};
|
use crate::{DashMap, HashMap};
|
||||||
use std::collections::hash_map::RandomState;
|
|
||||||
use core::hash::{BuildHasher, Hash};
|
use core::hash::{BuildHasher, Hash};
|
||||||
use core::mem;
|
use core::mem;
|
||||||
|
use std::collections::hash_map::RandomState;
|
||||||
|
|
||||||
cfg_if::cfg_if! {
|
cfg_if::cfg_if! {
|
||||||
if #[cfg(feature = "no_std")] {
|
if #[cfg(feature = "no_std")] {
|
||||||
|
|
|
@ -19,7 +19,6 @@ pub mod rayon {
|
||||||
pub mod set;
|
pub mod set;
|
||||||
}
|
}
|
||||||
|
|
||||||
use std::collections::hash_map::RandomState;
|
|
||||||
use cfg_if::cfg_if;
|
use cfg_if::cfg_if;
|
||||||
use core::borrow::Borrow;
|
use core::borrow::Borrow;
|
||||||
use core::fmt;
|
use core::fmt;
|
||||||
|
@ -33,6 +32,7 @@ use mapref::multiple::RefMulti;
|
||||||
use mapref::one::{Ref, RefMut};
|
use mapref::one::{Ref, RefMut};
|
||||||
pub use read_only::ReadOnlyView;
|
pub use read_only::ReadOnlyView;
|
||||||
pub use set::DashSet;
|
pub use set::DashSet;
|
||||||
|
use std::collections::hash_map::RandomState;
|
||||||
pub use t::Map;
|
pub use t::Map;
|
||||||
|
|
||||||
cfg_if! {
|
cfg_if! {
|
||||||
|
|
|
@ -3,10 +3,10 @@ use crate::lock::RwLockWriteGuard;
|
||||||
use crate::util;
|
use crate::util;
|
||||||
use crate::util::SharedValue;
|
use crate::util::SharedValue;
|
||||||
use crate::HashMap;
|
use crate::HashMap;
|
||||||
use std::collections::hash_map::RandomState;
|
|
||||||
use core::hash::{BuildHasher, Hash};
|
use core::hash::{BuildHasher, Hash};
|
||||||
use core::mem;
|
use core::mem;
|
||||||
use core::ptr;
|
use core::ptr;
|
||||||
|
use std::collections::hash_map::RandomState;
|
||||||
|
|
||||||
pub enum Entry<'a, K, V, S = RandomState> {
|
pub enum Entry<'a, K, V, S = RandomState> {
|
||||||
Occupied(OccupiedEntry<'a, K, V, S>),
|
Occupied(OccupiedEntry<'a, K, V, S>),
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
use crate::lock::{RwLockReadGuard, RwLockWriteGuard};
|
use crate::lock::{RwLockReadGuard, RwLockWriteGuard};
|
||||||
use crate::HashMap;
|
use crate::HashMap;
|
||||||
use std::collections::hash_map::RandomState;
|
|
||||||
use core::hash::BuildHasher;
|
use core::hash::BuildHasher;
|
||||||
use core::hash::Hash;
|
use core::hash::Hash;
|
||||||
use core::ops::{Deref, DerefMut};
|
use core::ops::{Deref, DerefMut};
|
||||||
|
use std::collections::hash_map::RandomState;
|
||||||
|
|
||||||
cfg_if::cfg_if! {
|
cfg_if::cfg_if! {
|
||||||
if #[cfg(feature = "no_std")] {
|
if #[cfg(feature = "no_std")] {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
use crate::lock::{RwLockReadGuard, RwLockWriteGuard};
|
use crate::lock::{RwLockReadGuard, RwLockWriteGuard};
|
||||||
use crate::HashMap;
|
use crate::HashMap;
|
||||||
use std::collections::hash_map::RandomState;
|
|
||||||
use core::hash::{BuildHasher, Hash};
|
use core::hash::{BuildHasher, Hash};
|
||||||
use core::ops::{Deref, DerefMut};
|
use core::ops::{Deref, DerefMut};
|
||||||
|
use std::collections::hash_map::RandomState;
|
||||||
|
|
||||||
// -- Shared
|
// -- Shared
|
||||||
pub struct Ref<'a, K, V, S = RandomState> {
|
pub struct Ref<'a, K, V, S = RandomState> {
|
||||||
|
|
|
@ -2,10 +2,10 @@ use crate::lock::RwLock;
|
||||||
use crate::mapref::multiple::{RefMulti, RefMutMulti};
|
use crate::mapref::multiple::{RefMulti, RefMutMulti};
|
||||||
use crate::util;
|
use crate::util;
|
||||||
use crate::{DashMap, HashMap};
|
use crate::{DashMap, HashMap};
|
||||||
use ahash::RandomState;
|
|
||||||
use core::hash::{BuildHasher, Hash};
|
use core::hash::{BuildHasher, Hash};
|
||||||
use rayon::iter::plumbing::UnindexedConsumer;
|
use rayon::iter::plumbing::UnindexedConsumer;
|
||||||
use rayon::iter::{FromParallelIterator, IntoParallelIterator, ParallelExtend, ParallelIterator};
|
use rayon::iter::{FromParallelIterator, IntoParallelIterator, ParallelExtend, ParallelIterator};
|
||||||
|
use std::collections::hash_map::RandomState;
|
||||||
|
|
||||||
cfg_if::cfg_if! {
|
cfg_if::cfg_if! {
|
||||||
if #[cfg(feature = "no_std")] {
|
if #[cfg(feature = "no_std")] {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
use crate::setref::multiple::RefMulti;
|
use crate::setref::multiple::RefMulti;
|
||||||
use crate::DashSet;
|
use crate::DashSet;
|
||||||
use ahash::RandomState;
|
|
||||||
use core::hash::{BuildHasher, Hash};
|
use core::hash::{BuildHasher, Hash};
|
||||||
use rayon::iter::plumbing::UnindexedConsumer;
|
use rayon::iter::plumbing::UnindexedConsumer;
|
||||||
use rayon::iter::{FromParallelIterator, IntoParallelIterator, ParallelExtend, ParallelIterator};
|
use rayon::iter::{FromParallelIterator, IntoParallelIterator, ParallelExtend, ParallelIterator};
|
||||||
|
use std::collections::hash_map::RandomState;
|
||||||
|
|
||||||
impl<K, S> ParallelExtend<K> for DashSet<K, S>
|
impl<K, S> ParallelExtend<K> for DashSet<K, S>
|
||||||
where
|
where
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
use crate::t::Map;
|
use crate::t::Map;
|
||||||
use crate::{DashMap, HashMap};
|
use crate::{DashMap, HashMap};
|
||||||
use std::collections::hash_map::RandomState;
|
|
||||||
use core::borrow::Borrow;
|
use core::borrow::Borrow;
|
||||||
use core::fmt;
|
use core::fmt;
|
||||||
use core::hash::{BuildHasher, Hash};
|
use core::hash::{BuildHasher, Hash};
|
||||||
|
use std::collections::hash_map::RandomState;
|
||||||
|
|
||||||
/// A read-only view into a `DashMap`. Allows to obtain raw references to the stored values.
|
/// A read-only view into a `DashMap`. Allows to obtain raw references to the stored values.
|
||||||
pub struct ReadOnlyView<K, V, S = RandomState> {
|
pub struct ReadOnlyView<K, V, S = RandomState> {
|
||||||
|
|
|
@ -5,12 +5,12 @@ use crate::setref::one::Ref;
|
||||||
use crate::DashMap;
|
use crate::DashMap;
|
||||||
#[cfg(feature = "raw-api")]
|
#[cfg(feature = "raw-api")]
|
||||||
use crate::HashMap;
|
use crate::HashMap;
|
||||||
use std::collections::hash_map::RandomState;
|
|
||||||
use cfg_if::cfg_if;
|
use cfg_if::cfg_if;
|
||||||
use core::borrow::Borrow;
|
use core::borrow::Borrow;
|
||||||
use core::fmt;
|
use core::fmt;
|
||||||
use core::hash::{BuildHasher, Hash};
|
use core::hash::{BuildHasher, Hash};
|
||||||
use core::iter::FromIterator;
|
use core::iter::FromIterator;
|
||||||
|
use std::collections::hash_map::RandomState;
|
||||||
|
|
||||||
/// DashSet is a thin wrapper around [`DashMap`] using `()` as the value type. It uses
|
/// DashSet is a thin wrapper around [`DashMap`] using `()` as the value type. It uses
|
||||||
/// methods and types which are more convenient to work with on a set.
|
/// methods and types which are more convenient to work with on a set.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::mapref;
|
use crate::mapref;
|
||||||
use std::collections::hash_map::RandomState;
|
|
||||||
use core::hash::{BuildHasher, Hash};
|
use core::hash::{BuildHasher, Hash};
|
||||||
use core::ops::Deref;
|
use core::ops::Deref;
|
||||||
|
use std::collections::hash_map::RandomState;
|
||||||
pub struct RefMulti<'a, K, S = RandomState> {
|
pub struct RefMulti<'a, K, S = RandomState> {
|
||||||
inner: mapref::multiple::RefMulti<'a, K, (), S>,
|
inner: mapref::multiple::RefMulti<'a, K, (), S>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::mapref;
|
use crate::mapref;
|
||||||
use std::collections::hash_map::RandomState;
|
|
||||||
use core::hash::{BuildHasher, Hash};
|
use core::hash::{BuildHasher, Hash};
|
||||||
use core::ops::Deref;
|
use core::ops::Deref;
|
||||||
|
use std::collections::hash_map::RandomState;
|
||||||
pub struct Ref<'a, K, S = RandomState> {
|
pub struct Ref<'a, K, S = RandomState> {
|
||||||
inner: mapref::one::Ref<'a, K, (), S>,
|
inner: mapref::one::Ref<'a, K, (), S>,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue