Fix Clippy warnings

This commit is contained in:
gwenn
2023-06-03 07:18:43 +02:00
parent 38691ca50b
commit 602a868783
2 changed files with 2 additions and 2 deletions

View File

@@ -884,7 +884,7 @@ pub fn dequote(s: &str) -> &str {
return s;
}
match s.bytes().next() {
Some(b) if b == b'"' || b == b'\'' => match s.bytes().rev().next() {
Some(b) if b == b'"' || b == b'\'' => match s.bytes().next_back() {
Some(e) if e == b => &s[1..s.len() - 1], // FIXME handle inner escaped quote(s)
_ => s,
},