Skip to content

Commit

Permalink
style: flatten unnecessary nested if expression (#787)
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored Jul 28, 2024
1 parent 4ac39d5 commit 2fb0f49
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 2fb0f49

Please sign in to comment.