Skip to content

Commit dced2d7

Browse files
committed
Linted
1 parent f9f54d7 commit dced2d7

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/sources/http.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,16 +181,14 @@ fn percent_decode(s: &str) -> Option<String> {
181181
let mut i = 0;
182182

183183
while i < bytes.len() {
184-
if bytes[i] == b'%' && i + 2 < bytes.len() {
185-
if let Ok(byte) = u8::from_str_radix(
186-
std::str::from_utf8(&bytes[i + 1..i + 3]).ok()?,
187-
16,
188-
) {
184+
if bytes[i] == b'%' && i + 2 < bytes.len()
185+
&& let Ok(byte) =
186+
u8::from_str_radix(std::str::from_utf8(&bytes[i + 1..i + 3]).ok()?, 16)
187+
{
189188
result.push(byte);
190189
i += 3;
191190
continue;
192191
}
193-
}
194192
result.push(bytes[i]);
195193
i += 1;
196194
}

0 commit comments

Comments
 (0)