Skip to content

Commit

Permalink
fix copy-paste mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertdev committed Nov 10, 2021
1 parent 445c106 commit 1d1c12a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types/int_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl StringRadix {
/// Is the string valid for the given radix?
pub fn matches_str(&self, slice: &str) -> bool {
// drop 1 optional + or -
let slice = slice.strip_prefix(|c| c == '+' || c == '-'));
let slice = slice.strip_prefix(|c| c == '+' || c == '-').unwrap_or(slice);

// there must be at least 1 actual digit
if slice.is_empty() {
Expand Down

0 comments on commit 1d1c12a

Please sign in to comment.