diff --git a/src/utils/flexver.rs b/src/utils/flexver.rs index 7290776..ffd77bb 100644 --- a/src/utils/flexver.rs +++ b/src/utils/flexver.rs @@ -79,10 +79,12 @@ fn decompose(str_in: &str) -> VecDeque { if numeric { return None; } else { - return Some(Numerical( - current.parse::().unwrap(), - current.to_owned(), - )); + return Some( + current + .parse::() + .map(|n| Numerical(n, current.to_owned())) + .unwrap_or_else(|_| Lexical(current.to_owned())), + ); } }