File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
libgrust/libformat_parser/generic_format_parser/src Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -991,8 +991,11 @@ fn find_width_map_from_snippet(
991
991
// If we only trimmed it off the input, `format!("\n")` would cause a mismatch as here we they actually match up.
992
992
// Alternatively, we could just count the trailing newlines and only trim one from the input if they don't match up.
993
993
let input_no_nl = input. trim_end_matches ( '\n' ) ;
994
- let Some ( unescaped) = unescape_string ( snippet) else {
995
- return InputStringKind :: NotALiteral ;
994
+ let unescaped = match unescape_string ( snippet) {
995
+ Some ( unescaped) => unescaped,
996
+ _ => {
997
+ return InputStringKind :: NotALiteral ;
998
+ }
996
999
} ;
997
1000
998
1001
let unescaped_no_nl = unescaped. trim_end_matches ( '\n' ) ;
You can’t perform that action at this time.
0 commit comments