fixer uppers

This commit is contained in:
Acrimon 2020-12-26 00:25:17 +01:00
parent ef374938a5
commit f167aec2b4
No known key found for this signature in database
GPG Key ID: FE567F46AFBDF3AE
12 changed files with 13 additions and 13 deletions

View File

@ -19,9 +19,9 @@ no_std = ["hashbrown"]
[dependencies]
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"
hashbrown = { version = "0.8.0", optional = true }
hashbrown = { version = "0.9.1", optional = true }
rayon = { version = "1.5.0", optional = true }
[package.metadata.docs.rs]

View File

@ -4,9 +4,9 @@ use crate::lock::{RwLockReadGuard, RwLockWriteGuard};
use crate::t::Map;
use crate::util::SharedValue;
use crate::{DashMap, HashMap};
use std::collections::hash_map::RandomState;
use core::hash::{BuildHasher, Hash};
use core::mem;
use std::collections::hash_map::RandomState;
cfg_if::cfg_if! {
if #[cfg(feature = "no_std")] {

View File

@ -19,7 +19,6 @@ pub mod rayon {
pub mod set;
}
use std::collections::hash_map::RandomState;
use cfg_if::cfg_if;
use core::borrow::Borrow;
use core::fmt;
@ -33,6 +32,7 @@ use mapref::multiple::RefMulti;
use mapref::one::{Ref, RefMut};
pub use read_only::ReadOnlyView;
pub use set::DashSet;
use std::collections::hash_map::RandomState;
pub use t::Map;
cfg_if! {

View File

@ -3,10 +3,10 @@ use crate::lock::RwLockWriteGuard;
use crate::util;
use crate::util::SharedValue;
use crate::HashMap;
use std::collections::hash_map::RandomState;
use core::hash::{BuildHasher, Hash};
use core::mem;
use core::ptr;
use std::collections::hash_map::RandomState;
pub enum Entry<'a, K, V, S = RandomState> {
Occupied(OccupiedEntry<'a, K, V, S>),

View File

@ -1,9 +1,9 @@
use crate::lock::{RwLockReadGuard, RwLockWriteGuard};
use crate::HashMap;
use std::collections::hash_map::RandomState;
use core::hash::BuildHasher;
use core::hash::Hash;
use core::ops::{Deref, DerefMut};
use std::collections::hash_map::RandomState;
cfg_if::cfg_if! {
if #[cfg(feature = "no_std")] {

View File

@ -1,8 +1,8 @@
use crate::lock::{RwLockReadGuard, RwLockWriteGuard};
use crate::HashMap;
use std::collections::hash_map::RandomState;
use core::hash::{BuildHasher, Hash};
use core::ops::{Deref, DerefMut};
use std::collections::hash_map::RandomState;
// -- Shared
pub struct Ref<'a, K, V, S = RandomState> {

View File

@ -2,10 +2,10 @@ use crate::lock::RwLock;
use crate::mapref::multiple::{RefMulti, RefMutMulti};
use crate::util;
use crate::{DashMap, HashMap};
use ahash::RandomState;
use core::hash::{BuildHasher, Hash};
use rayon::iter::plumbing::UnindexedConsumer;
use rayon::iter::{FromParallelIterator, IntoParallelIterator, ParallelExtend, ParallelIterator};
use std::collections::hash_map::RandomState;
cfg_if::cfg_if! {
if #[cfg(feature = "no_std")] {

View File

@ -1,9 +1,9 @@
use crate::setref::multiple::RefMulti;
use crate::DashSet;
use ahash::RandomState;
use core::hash::{BuildHasher, Hash};
use rayon::iter::plumbing::UnindexedConsumer;
use rayon::iter::{FromParallelIterator, IntoParallelIterator, ParallelExtend, ParallelIterator};
use std::collections::hash_map::RandomState;
impl<K, S> ParallelExtend<K> for DashSet<K, S>
where

View File

@ -1,9 +1,9 @@
use crate::t::Map;
use crate::{DashMap, HashMap};
use std::collections::hash_map::RandomState;
use core::borrow::Borrow;
use core::fmt;
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.
pub struct ReadOnlyView<K, V, S = RandomState> {

View File

@ -5,12 +5,12 @@ use crate::setref::one::Ref;
use crate::DashMap;
#[cfg(feature = "raw-api")]
use crate::HashMap;
use std::collections::hash_map::RandomState;
use cfg_if::cfg_if;
use core::borrow::Borrow;
use core::fmt;
use core::hash::{BuildHasher, Hash};
use core::iter::FromIterator;
use std::collections::hash_map::RandomState;
/// 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.

View File

@ -1,7 +1,7 @@
use crate::mapref;
use std::collections::hash_map::RandomState;
use core::hash::{BuildHasher, Hash};
use core::ops::Deref;
use std::collections::hash_map::RandomState;
pub struct RefMulti<'a, K, S = RandomState> {
inner: mapref::multiple::RefMulti<'a, K, (), S>,
}

View File

@ -1,7 +1,7 @@
use crate::mapref;
use std::collections::hash_map::RandomState;
use core::hash::{BuildHasher, Hash};
use core::ops::Deref;
use std::collections::hash_map::RandomState;
pub struct Ref<'a, K, S = RandomState> {
inner: mapref::one::Ref<'a, K, (), S>,
}