From 4ef16741e355754abd446acbd80e5afb784864c7 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Fri, 28 Nov 2014 11:57:41 -0500 Subject: 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 --- src/libstd/time/duration.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/libstd/time') diff --git a/src/libstd/time/duration.rs b/src/libstd/time/duration.rs index ec2d62ff85c..63eb9a98736 100644 --- a/src/libstd/time/duration.rs +++ b/src/libstd/time/duration.rs @@ -14,9 +14,11 @@ use {fmt, i64}; use ops::{Add, Sub, Mul, Div, Neg}; -use option::{Option, Some, None}; +use option::Option; +use option::Option::{Some, None}; use num::Int; -use result::{Result, Ok, Err}; +use result::Result; +use result::Result::{Ok, Err}; /// The number of nanoseconds in a microsecond. const NANOS_PER_MICRO: i32 = 1000; @@ -387,7 +389,7 @@ fn div_rem_64(this: i64, other: i64) -> (i64, i64) { mod tests { use super::{Duration, MIN, MAX}; use {i32, i64}; - use option::{Some, None}; + use option::Option::{Some, None}; use string::ToString; #[test] -- cgit 1.4.1-3-g733a5