mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-28 01:11:15 -03:00
clippy: fix byte_char_slices lint
https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices Part of #12658
This commit is contained in:
committed by
Johannes Altmanninger
parent
1dfc75bb9c
commit
f3e43e932f
@@ -398,7 +398,7 @@ fn escape_string_url(input: &wstr) -> WString {
|
||||
for byte in narrow {
|
||||
if (byte & 0x80) == 0 {
|
||||
let c = char::from_u32(u32::from(byte)).unwrap();
|
||||
if c.is_alphanumeric() || [b'/', b'.', b'~', b'-', b'_'].contains(&byte) {
|
||||
if c.is_alphanumeric() || b"/.~-_".contains(&byte) {
|
||||
// The above characters don't need to be encoded.
|
||||
out.push(c);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user