Skip to content

Commit

Permalink
chore: flatten unnecessary nested if expression
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto committed Jul 28, 2024
1 parent 4ac39d5 commit a6edfe8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/frame/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,12 +564,10 @@ impl Pseudo {

let path = if !path.is_empty() {
path
} else if method == Method::OPTIONS {
BytesStr::from_static("*")
} else {
if method == Method::OPTIONS {
BytesStr::from_static("*")
} else {
BytesStr::from_static("/")
}
BytesStr::from_static("/")
};

(parts.scheme, Some(path))
Expand Down

0 comments on commit a6edfe8

Please sign in to comment.