None of the call sites don't do this.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Duration::from_secs( s.value()?.parse()? )
}
}
-macro_rules! parseable_from_str { ($t:ty $(, $def:expr)? ) => {
+macro_rules! parseable_from_str { ($t:ty, $def:expr) => {
impl Parseable for $t {
#[throws(AE)]
fn parse(s: Option<&str>) -> $t { s.value()?.parse()? }
- $( #[throws(AE)] fn default_for_ordinary() -> Self { $def } )?
+ #[throws(AE)] fn default_for_ordinary() -> Self { $def }
}
} }
parseable_from_str!{u16, default() }