From 73806ddd0fd91066d7b903a00a080cbadcc04311 Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Mon, 15 Sep 2014 19:29:47 -0700 Subject: Use $crate and macro reexport to reduce duplicated code Many of libstd's macros are now re-exported from libcore and libcollections. Their libstd definitions have moved to a macros_stage0 module and can disappear after the next snapshot. Where the two crates had already diverged, I took the libstd versions as they're generally newer and better-tested. See e.g. d3c831b, which was a fix to libstd's assert_eq!() that didn't make it into libcore's. Fixes #16806. --- src/libstd/time/duration.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/libstd/time') diff --git a/src/libstd/time/duration.rs b/src/libstd/time/duration.rs index d48b0342b3b..ac1f0c5d803 100644 --- a/src/libstd/time/duration.rs +++ b/src/libstd/time/duration.rs @@ -17,8 +17,10 @@ use ops::{Add, Sub, Mul, Div, Neg, FnOnce}; use option::Option; use option::Option::{Some, None}; use num::Int; -use result::Result; -use result::Result::{Ok, Err}; +use result::Result::Ok; + +// NOTE: for old macros; remove after the next snapshot +#[cfg(stage0)] use result::Result::Err; /// The number of nanoseconds in a microsecond. const NANOS_PER_MICRO: i32 = 1000; -- cgit 1.4.1-3-g733a5