forked from spacebar/rust-nex
add handeling for empty bounds string
This commit is contained in:
parent
f678bcc929
commit
9ebf88d8eb
1 changed files with 3 additions and 0 deletions
|
|
@ -121,6 +121,9 @@ fn check_bounds_str<T: FromStr + PartialOrd>(compare: T, str: &str) -> Option<bo
|
|||
if let Ok(val) = T::from_str(str) {
|
||||
return Some(val == compare);
|
||||
}
|
||||
if str.is_empty() {
|
||||
return Some(true);
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue