Skip to content

Commit

Permalink
fix: remove redundant guard
Browse files Browse the repository at this point in the history
  • Loading branch information
sstadick committed Jun 21, 2024
1 parent f084e0c commit 0fb5266
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/field_range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl FromStr for FieldRange {
Err(FieldError::FailedParse(nm.to_owned()))
}
}
(Some(n), Some(m)) if m.is_empty() => {
(Some(n), Some("")) => {
if let Ok(low) = n.parse::<usize>() {
if low > 0 {
Ok(FieldRange {
Expand All @@ -89,7 +89,7 @@ impl FromStr for FieldRange {
Err(FieldError::FailedParse(n.to_owned()))
}
}
(Some(n), Some(m)) if n.is_empty() => {
(Some(""), Some(m)) => {
if let Ok(high) = m.parse::<usize>() {
if high > 0 {
Ok(FieldRange {
Expand Down

0 comments on commit 0fb5266

Please sign in to comment.