mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-29 19:24:58 +02:00
clippy warnings
This commit is contained in:
@ -130,7 +130,6 @@ impl H1Decoder {
|
||||
if let Ok(name) =
|
||||
HeaderName::from_bytes(&slice[idx.name.0..idx.name.1])
|
||||
{
|
||||
has_upgrade = has_upgrade || name == header::UPGRADE;
|
||||
// Unsafe: httparse check header value for valid utf-8
|
||||
let value = unsafe {
|
||||
HeaderValue::from_shared_unchecked(
|
||||
@ -176,6 +175,9 @@ impl H1Decoder {
|
||||
};
|
||||
inner.flags.get_mut().set(MessageFlags::KEEPALIVE, ka);
|
||||
}
|
||||
header::UPGRADE => {
|
||||
has_upgrade = true;
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
||||
|
@ -204,9 +204,12 @@ impl<T: AsyncWrite, H: 'static> Writer for H1Writer<T, H> {
|
||||
ResponseLength::None => (),
|
||||
_ => continue,
|
||||
},
|
||||
DATE => {
|
||||
has_date = true;
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
has_date = has_date || key == DATE;
|
||||
|
||||
let v = value.as_ref();
|
||||
let k = key.as_str().as_bytes();
|
||||
let len = k.len() + v.len() + 4;
|
||||
|
Reference in New Issue
Block a user