From e7586f4a8abf6204ae505cdd541f80d08051b617 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Fri, 8 Feb 2019 11:54:41 +0100 Subject: [PATCH] impl Default for Duration --- ci/script.sh | 4 ++++ src/lib.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ci/script.sh b/ci/script.sh index 0244c58171..3dd60de326 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -118,6 +118,10 @@ if [ -z ${TRAVIS_RUST_VERSION-} ]; then esac fi +if [ -z ${TARGET-} ]; then + TARGET=$(rustc -Vv | grep host | cut -d ' ' -f2) +fi + if [ $TRAVIS_BRANCH != master ] || [ $TRAVIS_PULL_REQUEST != false ]; then main fi diff --git a/src/lib.rs b/src/lib.rs index 6aad041ea5..4756702e6e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -197,7 +197,7 @@ impl PartialOrd for Instant { /// A `Duration` type to represent a span of time. /// /// This data type is only available when the `timer-queue` feature is enabled -#[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)] +#[derive(Clone, Copy, Default, Eq, Ord, PartialEq, PartialOrd)] #[cfg(feature = "timer-queue")] pub struct Duration(u32);