Skip to content

Commit ff5f5d1

Browse files
committed
docs: added comment for clarity
1 parent adbae82 commit ff5f5d1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/input/shared.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ fn clean_int_str(mut s: &str) -> Option<Cow<str>> {
128128
// returning. This allows consistent handling of leading zeros for both positive and negative numbers.
129129
let mut is_negative = false;
130130
if let Some(suffix) = s.strip_prefix('-') {
131+
// Invalidate "--" and "-+" as an integer prefix by returning None
131132
if suffix.starts_with('-') | suffix.starts_with('+') {
132133
return None;
133134
}

0 commit comments

Comments
 (0)