From 2fb0f49a082e62c3a7cce813aad69c376b01649f Mon Sep 17 00:00:00 2001 From: tottoto Date: Sun, 28 Jul 2024 22:52:29 +0900 Subject: [PATCH] style: flatten unnecessary nested if expression (#787) --- src/frame/headers.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/frame/headers.rs b/src/frame/headers.rs index bb36cd4f..0c756325 100644 --- a/src/frame/headers.rs +++ b/src/frame/headers.rs @@ -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))