Skip to content

Commit 1d1c12a

Browse files
committed
fix copy-paste mistake
1 parent 445c106 commit 1d1c12a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/types/int_type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl StringRadix {
4545
/// Is the string valid for the given radix?
4646
pub fn matches_str(&self, slice: &str) -> bool {
4747
// drop 1 optional + or -
48-
let slice = slice.strip_prefix(|c| c == '+' || c == '-'));
48+
let slice = slice.strip_prefix(|c| c == '+' || c == '-').unwrap_or(slice);
4949

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

0 commit comments

Comments
 (0)