mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-15 22:51:13 -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;
|
let mut cursor = arg;
|
||||||
while !cursor.is_empty() {
|
while !cursor.is_empty() {
|
||||||
if cursor.char_at(0) == '\\' {
|
if cursor.char_at(0) == '\\' {
|
||||||
if let Some(escape_len) = read_unquoted_escape(cursor, &mut result, true, false) {
|
let escape_len = read_unquoted_escape(cursor, &mut result, true, false)?;
|
||||||
cursor = cursor.slice_from(escape_len);
|
cursor = cursor.slice_from(escape_len);
|
||||||
} else {
|
|
||||||
// invalid escape
|
|
||||||
return None;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
result.push(cursor.char_at(0));
|
result.push(cursor.char_at(0));
|
||||||
cursor = cursor.slice_from(1);
|
cursor = cursor.slice_from(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user