Skip to content

Commit 3790715

Browse files
committed
Fix clippy warning
1 parent 7bf4ab6 commit 3790715

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/proxies/forwarded.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,9 @@ impl<'a> Forwarded<'a> {
243243
_ => { /* extensions are allowed in the spec */ }
244244
}
245245

246-
if rest.starts_with(';') {
247-
Ok(&rest[1..])
248-
} else {
249-
Ok(rest)
246+
match rest.strip_prefix(';') {
247+
Some(rest) => Ok(rest),
248+
None => Ok(rest),
250249
}
251250
}
252251

0 commit comments

Comments
 (0)