diff --git a/src/cargo/core/registry.rs b/src/cargo/core/registry.rs index ab64c622c68..0b199db66f2 100644 --- a/src/cargo/core/registry.rs +++ b/src/cargo/core/registry.rs @@ -1,5 +1,6 @@ use std::collections::HashSet; -use std::collections::hash_map::{HashMap, Occupied, Vacant}; +use std::collections::hash_map::HashMap; +use std::collections::hash_map::Entry::{Occupied, Vacant}; use core::{Source, SourceId, SourceMap, Summary, Dependency, PackageId, Package}; use util::{CargoResult, ChainError, Config, human, profile}; diff --git a/src/cargo/core/resolver/mod.rs b/src/cargo/core/resolver/mod.rs index 1318a9ec30d..1a1f9423c13 100644 --- a/src/cargo/core/resolver/mod.rs +++ b/src/cargo/core/resolver/mod.rs @@ -1,6 +1,7 @@ use std::cell::RefCell; use std::collections::HashSet; -use std::collections::hash_map::{HashMap, Occupied, Vacant}; +use std::collections::hash_map::HashMap; +use std::collections::hash_map::Entry::{Occupied, Vacant}; use std::fmt; use std::rc::Rc; use semver; diff --git a/src/cargo/ops/cargo_rustc/context.rs b/src/cargo/ops/cargo_rustc/context.rs index 468b4f13632..70ce7f26379 100644 --- a/src/cargo/ops/cargo_rustc/context.rs +++ b/src/cargo/ops/cargo_rustc/context.rs @@ -1,4 +1,5 @@ -use std::collections::hash_map::{HashMap, Occupied, Vacant}; +use std::collections::hash_map::HashMap; +use std::collections::hash_map::Entry::{Occupied, Vacant}; use std::str; use std::sync::Arc; diff --git a/src/cargo/ops/cargo_rustc/fingerprint.rs b/src/cargo/ops/cargo_rustc/fingerprint.rs index 1075f8b7fb2..edcd30dd9b7 100644 --- a/src/cargo/ops/cargo_rustc/fingerprint.rs +++ b/src/cargo/ops/cargo_rustc/fingerprint.rs @@ -1,4 +1,4 @@ -use std::collections::hash_map::{Occupied, Vacant}; +use std::collections::hash_map::Entry::{Occupied, Vacant}; use std::hash::{Hash, Hasher}; use std::hash::sip::SipHasher; use std::io::{mod, fs, File, BufferedReader}; diff --git a/src/cargo/ops/cargo_rustc/job_queue.rs b/src/cargo/ops/cargo_rustc/job_queue.rs index 07ddf302c87..41f6d172323 100644 --- a/src/cargo/ops/cargo_rustc/job_queue.rs +++ b/src/cargo/ops/cargo_rustc/job_queue.rs @@ -1,5 +1,6 @@ use std::collections::HashSet; -use std::collections::hash_map::{HashMap, Occupied, Vacant}; +use std::collections::hash_map::HashMap; +use std::collections::hash_map::Entry::{Occupied, Vacant}; use std::sync::TaskPool; use term::color::YELLOW; diff --git a/src/cargo/util/config.rs b/src/cargo/util/config.rs index a796bb38099..8d000b6413c 100644 --- a/src/cargo/util/config.rs +++ b/src/cargo/util/config.rs @@ -1,6 +1,7 @@ use std::{fmt, os, mem}; use std::cell::{RefCell, RefMut}; -use std::collections::hash_map::{HashMap, Occupied, Vacant}; +use std::collections::hash_map::{HashMap}; +use std::collections::hash_map::Entry::{Occupied, Vacant}; use std::io; use std::io::fs::{mod, PathExtensions, File}; use std::string; diff --git a/src/cargo/util/dependency_queue.rs b/src/cargo/util/dependency_queue.rs index 8e868b4a413..266071233eb 100644 --- a/src/cargo/util/dependency_queue.rs +++ b/src/cargo/util/dependency_queue.rs @@ -4,8 +4,9 @@ //! This structure is used to store the dependency graph and dynamically update //! it to figure out when a dependency should be built. -use std::collections::{HashMap, HashSet}; -use std::collections::hash_map::{Occupied, Vacant}; +use std::collections::hash_set::HashSet; +use std::collections::hash_map::HashMap; +use std::collections::hash_map::Entry::{Occupied, Vacant}; use std::hash::Hash; pub use self::Freshness::{Fresh, Dirty}; diff --git a/src/cargo/util/graph.rs b/src/cargo/util/graph.rs index b797cb3dda6..b5f4a6335cc 100644 --- a/src/cargo/util/graph.rs +++ b/src/cargo/util/graph.rs @@ -1,8 +1,9 @@ use std::fmt; use std::hash::Hash; -use std::collections::{HashMap, HashSet}; -use std::collections::hash_map::{Keys, Occupied, Vacant}; -use std::collections::hash_set::SetItems; +use std::collections::hash_set::HashSet; +use std::collections::hash_map::{HashMap, Keys}; +use std::collections::hash_map::Entry::{Occupied, Vacant}; +use std::collections::hash_set::Iter; pub struct Graph { nodes: HashMap> @@ -14,7 +15,7 @@ enum Mark { } pub type Nodes<'a, N> = Keys<'a, N, HashSet>; -pub type Edges<'a, N> = SetItems<'a, N>; +pub type Edges<'a, N> = Iter<'a, N>; impl Graph { pub fn new() -> Graph {