chore(clippy): appease 1.97 lints — derive Default, collapse ifs, drop needless borrow
Pre-existing, surfaced by the toolchain bump (rust-version is 1.95; the sandbox gates with stable 1.97). All four are cargo clippy --fix output with the mechanical-collapse indentation hand-tidied to house style; the parser change is semantics-preserving (a non-100-continue Expect value now falls to the _ arm instead of an empty if — headers.append still runs after the match either way). No fmt pass: rustfmt would clobber the aligned-assignment style, so only the touched lines moved.
This commit is contained in:
+2
-4
@@ -158,7 +158,9 @@ impl Body {
|
||||
// Empty `Vec`s are skipped by the pump (a zero-length chunk would
|
||||
// terminate chunked framing early), so they are safe to send but useless.
|
||||
|
||||
#[derive(Default)]
|
||||
pub enum RespBody {
|
||||
#[default]
|
||||
Empty,
|
||||
Bytes(Vec<u8>),
|
||||
Stream(StreamBody),
|
||||
@@ -217,10 +219,6 @@ impl RespBody {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for RespBody {
|
||||
fn default() -> Self { RespBody::Empty }
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Params — path parameters extracted by the router.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user