From f167aec2b4c83d31fdc3c56357969ca266fef352 Mon Sep 17 00:00:00 2001 From: Acrimon Date: Sat, 26 Dec 2020 00:25:17 +0100 Subject: [PATCH] fixer uppers --- Cargo.toml | 4 ++-- src/iter.rs | 2 +- src/lib.rs | 2 +- src/mapref/entry.rs | 2 +- src/mapref/multiple.rs | 2 +- src/mapref/one.rs | 2 +- src/rayon/map.rs | 2 +- src/rayon/set.rs | 2 +- src/read_only.rs | 2 +- src/set.rs | 2 +- src/setref/multiple.rs | 2 +- src/setref/one.rs | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ee4f63b..9b47bb6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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] diff --git a/src/iter.rs b/src/iter.rs index 4a88b1d..3c32bcb 100644 --- a/src/iter.rs +++ b/src/iter.rs @@ -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")] { diff --git a/src/lib.rs b/src/lib.rs index a55a5ad..75d4998 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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! { diff --git a/src/mapref/entry.rs b/src/mapref/entry.rs index 48f6c05..7a609ee 100644 --- a/src/mapref/entry.rs +++ b/src/mapref/entry.rs @@ -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>), diff --git a/src/mapref/multiple.rs b/src/mapref/multiple.rs index c4a8ddc..eeb0282 100644 --- a/src/mapref/multiple.rs +++ b/src/mapref/multiple.rs @@ -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")] { diff --git a/src/mapref/one.rs b/src/mapref/one.rs index 9a4f6fe..67c1706 100644 --- a/src/mapref/one.rs +++ b/src/mapref/one.rs @@ -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> { diff --git a/src/rayon/map.rs b/src/rayon/map.rs index 1a5ac0d..55b7104 100644 --- a/src/rayon/map.rs +++ b/src/rayon/map.rs @@ -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")] { diff --git a/src/rayon/set.rs b/src/rayon/set.rs index d2a64cf..11c06cc 100644 --- a/src/rayon/set.rs +++ b/src/rayon/set.rs @@ -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 ParallelExtend for DashSet where diff --git a/src/read_only.rs b/src/read_only.rs index c111a63..b0e7a65 100644 --- a/src/read_only.rs +++ b/src/read_only.rs @@ -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 { diff --git a/src/set.rs b/src/set.rs index d5a7e18..e4d77df 100644 --- a/src/set.rs +++ b/src/set.rs @@ -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. diff --git a/src/setref/multiple.rs b/src/setref/multiple.rs index 27ff94a..21e7ed4 100644 --- a/src/setref/multiple.rs +++ b/src/setref/multiple.rs @@ -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>, } diff --git a/src/setref/one.rs b/src/setref/one.rs index 6707764..ef03421 100644 --- a/src/setref/one.rs +++ b/src/setref/one.rs @@ -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>, }