diff options
| author | Corey Farwell <coreyf@rwell.org> | 2014-11-28 11:57:41 -0500 |
|---|---|---|
| committer | Corey Farwell <coreyf@rwell.org> | 2014-12-05 18:13:04 -0500 |
| commit | 4ef16741e355754abd446acbd80e5afb784864c7 (patch) | |
| tree | bfe4f64de5b3bcf88672424d0f66b5ad12fe7054 /src/libstd/collections | |
| parent | 6f4c11be3b9706d1ba0e1b74b89de1478410a56f (diff) | |
| download | rust-4ef16741e355754abd446acbd80e5afb784864c7.tar.gz rust-4ef16741e355754abd446acbd80e5afb784864c7.zip | |
Utilize fewer reexports
In regards to: https://github.com/rust-lang/rust/issues/19253#issuecomment-64836729 This commit: * Changes the #deriving code so that it generates code that utilizes fewer reexports (in particur Option::* and Result::*), which is necessary to remove those reexports in the future * Changes other areas of the codebase so that fewer reexports are utilized
Diffstat (limited to 'src/libstd/collections')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 6 | ||||
| -rw-r--r-- | src/libstd/collections/hash/set.rs | 4 | ||||
| -rw-r--r-- | src/libstd/collections/hash/table.rs | 3 | ||||
| -rw-r--r-- | src/libstd/collections/lru_cache.rs | 5 |
4 files changed, 11 insertions, 7 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index cf09c93f917..8f879bd50d0 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -25,8 +25,10 @@ use kinds::Sized; use mem::{mod, replace}; use num::{Int, UnsignedInt}; use ops::{Deref, Index, IndexMut}; -use option::{Some, None, Option}; -use result::{Result, Ok, Err}; +use option::Option; +use option::Option::{Some, None}; +use result::Result; +use result::Result::{Ok, Err}; use super::table; use super::table::{ diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index b40622171d5..fd32d207e79 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -19,8 +19,8 @@ use fmt; use hash::{Hash, Hasher, RandomSipHasher}; use iter::{Iterator, IteratorExt, FromIterator, FilterMap, Chain, Repeat, Zip, Extend, repeat}; use iter; -use option::{Some, None}; -use result::{Ok, Err}; +use option::Option::{Some, None}; +use result::Result::{Ok, Err}; use super::map::{HashMap, Entries, MoveEntries, INITIAL_CAPACITY}; diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs index f41ccea0aaf..de06a1e0bbd 100644 --- a/src/libstd/collections/hash/table.rs +++ b/src/libstd/collections/hash/table.rs @@ -21,7 +21,8 @@ use mem::{min_align_of, size_of}; use mem; use num::{Int, UnsignedInt}; use ops::{Deref, DerefMut, Drop}; -use option::{Some, None, Option}; +use option::Option; +use option::Option::{Some, None}; use ptr::{RawPtr, copy_nonoverlapping_memory, zero_memory}; use ptr; use rt::heap::{allocate, deallocate}; diff --git a/src/libstd/collections/lru_cache.rs b/src/libstd/collections/lru_cache.rs index 94bea37d187..adbc135364b 100644 --- a/src/libstd/collections/lru_cache.rs +++ b/src/libstd/collections/lru_cache.rs @@ -44,10 +44,11 @@ use hash::Hash; use iter::{range, Iterator, Extend}; use mem; use ops::Drop; -use option::{Some, None, Option}; +use option::Option; +use option::Option::{Some, None}; use boxed::Box; use ptr; -use result::{Ok, Err}; +use result::Result::{Ok, Err}; // FIXME(conventions): implement iterators? // FIXME(conventions): implement indexing? |
