From 351fd085b14eda86826f8e248d39ff3632dd4ab6 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 1 Feb 2025 12:16:00 +0000 Subject: [PATCH] config: parseable_from_str: always provide default_or_ordinary None of the call sites don't do this. Signed-off-by: Ian Jackson --- src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 9ff2d83..4d31309 100644 --- a/src/config.rs +++ b/src/config.rs @@ -630,11 +630,11 @@ impl Parseable for Duration { 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() } -- 2.30.2