clippy: fix question_mark lint

https://rust-lang.github.io/rust-clippy/master/index.html#question_mark

Closes #12658
This commit is contained in:
xtqqczze
2026-04-20 02:26:52 +01:00
committed by Johannes Altmanninger
parent f3e43e932f
commit 4e47f47d85

View File

@@ -160,12 +160,8 @@ fn interpret_escape(arg: &'args wstr) -> Option<WString> {
let mut cursor = arg;
while !cursor.is_empty() {
if cursor.char_at(0) == '\\' {
if let Some(escape_len) = read_unquoted_escape(cursor, &mut result, true, false) {
cursor = cursor.slice_from(escape_len);
} else {
// invalid escape
return None;
}
let escape_len = read_unquoted_escape(cursor, &mut result, true, false)?;
cursor = cursor.slice_from(escape_len);
} else {
result.push(cursor.char_at(0));
cursor = cursor.slice_from(1);