From 7890dc753977ec8b5d8bae362fa5547a87b8d195 Mon Sep 17 00:00:00 2001 From: Orne Brocaar Date: Mon, 1 Aug 2022 14:45:43 +0100 Subject: [PATCH] Also match 1.0 and 1.1 strings for MacVersion. --- lrwn/src/region/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lrwn/src/region/mod.rs b/lrwn/src/region/mod.rs index bdb65526..57299ae0 100644 --- a/lrwn/src/region/mod.rs +++ b/lrwn/src/region/mod.rs @@ -228,12 +228,12 @@ impl FromStr for MacVersion { fn from_str(s: &str) -> std::result::Result { Ok(match s { - "1.0.0" => MacVersion::LORAWAN_1_0_0, + "1.0.0" | "1.0" => MacVersion::LORAWAN_1_0_0, "1.0.1" => MacVersion::LORAWAN_1_0_1, "1.0.2" => MacVersion::LORAWAN_1_0_2, "1.0.3" => MacVersion::LORAWAN_1_0_3, "1.0.4" => MacVersion::LORAWAN_1_0_4, - "1.1.0" => MacVersion::LORAWAN_1_1_0, + "1.1.0" | "1.1" => MacVersion::LORAWAN_1_1_0, _ => { return Err(anyhow!("Unexpected MacVersion: {}", s)); }