Reorder imports

This commit is contained in:
Pyfisch 2018-11-06 20:38:02 +01:00
parent 4a947dd719
commit 9e92eb205a
546 changed files with 1968 additions and 1536 deletions

View file

@ -20,8 +20,8 @@ use std::fmt;
use std::hash::{BuildHasher, Hash};
use std::ops::{Deref, DerefMut};
pub use std::collections::hash_map::{Entry, RandomState, Iter as MapIter, IterMut as MapIterMut};
pub use std::collections::hash_set::{Iter as SetIter, IntoIter as SetIntoIter};
pub use std::collections::hash_map::{Entry, Iter as MapIter, IterMut as MapIterMut, RandomState};
pub use std::collections::hash_set::{IntoIter as SetIntoIter, Iter as SetIter};
#[derive(Clone)]
pub struct HashMap<K, V, S = RandomState>(StdMap<K, V, S>);

View file

@ -15,13 +15,13 @@ use std::borrow::Borrow;
use std::cmp::max;
use std::fmt::{self, Debug};
#[allow(deprecated)]
use std::hash::{Hash, BuildHasher};
use std::hash::{BuildHasher, Hash};
use std::iter::FromIterator;
use std::mem::{self, replace};
use std::ops::{Deref, Index};
use super::table::{self, Bucket, EmptyBucket, FullBucket, FullBucketMut, RawTable, SafeHash};
use super::table::BucketState::{Empty, Full};
use super::table::{self, Bucket, EmptyBucket, FullBucket, FullBucketMut, RawTable, SafeHash};
use FailedAllocationError;
@ -2214,11 +2214,11 @@ fn assert_covariance() {
#[cfg(test)]
mod test_map {
extern crate rand;
use super::HashMap;
use self::rand::{thread_rng, Rng};
use super::Entry::{Occupied, Vacant};
use super::HashMap;
use super::RandomState;
use cell::RefCell;
use self::rand::{thread_rng, Rng};
#[test]
fn test_zero_capacities() {

View file

@ -10,12 +10,12 @@
use std::borrow::Borrow;
use std::fmt;
use std::hash::{Hash, BuildHasher};
use std::hash::{BuildHasher, Hash};
use std::iter::{Chain, FromIterator};
use std::ops::{BitOr, BitAnd, BitXor, Sub};
use std::ops::{BitAnd, BitOr, BitXor, Sub};
use super::Recover;
use super::hash_map::{self, HashMap, Keys, RandomState};
use super::Recover;
// Future Optimization (FIXME!)
// =============================
@ -1258,8 +1258,8 @@ fn assert_covariance() {
#[cfg(test)]
mod test_set {
use super::HashSet;
use super::hash_map::RandomState;
use super::HashSet;
#[test]
fn test_zero_capacities() {

View file

@ -9,13 +9,13 @@
// except according to those terms.
use alloc::{alloc, dealloc};
use shim::{Shared, Unique};
use std::cmp;
use std::hash::{BuildHasher, Hash, Hasher};
use std::marker;
use std::mem::{self, align_of, size_of};
use std::ops::{Deref, DerefMut};
use std::ptr;
use shim::{Unique, Shared};
use self::BucketState::*;
use FailedAllocationError;