diff --git a/src/de.rs b/src/de.rs index 1932e271..912347c8 100644 --- a/src/de.rs +++ b/src/de.rs @@ -560,7 +560,7 @@ where // if we are left with leading zero(s) followed by numeric characters // this is in fact a string according to the YAML 1.2 spec // https://yaml.org/spec/1.2/spec.html#id2761292 - if v.len() > 1 && v.starts_with("0") && v.chars().all(char::is_numeric) { + if v.len() > 1 && v.starts_with('0') && v.chars().all(char::is_numeric) { return visitor.visit_str(v); } if let Ok(n) = v.parse() {