Skip to content

Commit

Permalink
Remove duplicate try_opt macro
Browse files Browse the repository at this point in the history
  • Loading branch information
pitdicker committed Oct 1, 2023
1 parent 0f19d6b commit d847576
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/duration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ use core::{fmt, i64};
#[cfg(feature = "std")]
use std::error::Error;

use crate::try_opt;

#[cfg(feature = "rkyv")]
use rkyv::{Archive, Deserialize, Serialize};

Expand All @@ -38,15 +40,6 @@ const SECS_PER_DAY: i64 = 86_400;
/// The number of (non-leap) seconds in a week.
const SECS_PER_WEEK: i64 = 604_800;

macro_rules! try_opt {
($e:expr) => {
match $e {
Some(v) => v,
None => return None,
}
};
}

/// ISO 8601 time duration with nanosecond precision.
///
/// This also allows for the negative duration; see individual methods for details.
Expand Down

0 comments on commit d847576

Please sign in to comment.