mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-24 11:41:15 -03:00
clippy: fix question_mark lint
https://rust-lang.github.io/rust-clippy/master/index.html#question_mark Closes #12658
This commit is contained in:
committed by
Johannes Altmanninger
parent
f3e43e932f
commit
4e47f47d85
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user