diff --git a/rnex-core/src/rmc/structures/string_set.rs b/rnex-core/src/rmc/structures/string_set.rs index efb6c05..7c55507 100644 --- a/rnex-core/src/rmc/structures/string_set.rs +++ b/rnex-core/src/rmc/structures/string_set.rs @@ -36,18 +36,13 @@ where type Err = Box; fn from_str(s: &str) -> Result { - Ok(Self( - s.split("|") - .filter(|v| !v.is_empty()) - .map(T::from_str) - .try_fold( - HashSet::new(), - |mut a, b| -> Result, Self::Err> { - a.insert(b.map_err(Box::new)?); - Ok(a) - }, - )?, - )) + Ok(Self(s.split("|").map(T::from_str).try_fold( + HashSet::new(), + |mut a, b| -> Result, Self::Err> { + a.insert(b.map_err(Box::new)?); + Ok(a) + }, + )?)) } } @@ -87,9 +82,5 @@ mod test { panic!("sets arent equivalent"); } } - - let _: StringSet = StringSet::from_str("").unwrap(); - - let _: StringSet = StringSet::from_str("10").unwrap(); } }