Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,12 @@ cast_possible_truncation = "allow" # TODO: consider
cast_precision_loss = "allow" # TODO: consider
checked_conversions = "allow"
else_if_without_else = "allow"
enum_glob_use = "allow"
float_arithmetic = "allow"
indexing_slicing = "allow"
integer_division = "allow"
integer_division_remainder_used = "allow"
let_unit_value = "allow"
map_err_ignore = "allow"
map_unwrap_or = "allow"
match_wild_err_arm = "allow"
missing_fields_in_debug = "allow" # TODO: use finish_non_exhaustive
missing_panics_doc = "allow" # TODO: might be false
multiple_inherent_impl = "allow"
multiple_unsafe_ops_per_block = "allow"
needless_pass_by_value = "allow"
panic = "allow"
Expand All @@ -139,7 +133,6 @@ redundant_closure_for_method_calls = "allow"
redundant_else = "allow"
struct_excessive_bools = "allow" # TODO: bogus lint?
trivially_copy_pass_by_ref = "allow"
unnecessary_trailing_comma = "allow"
unnested_or_patterns = "allow"
unused_async = "allow" # TODO: is it for API?
unused_trait_names = "allow" # TODO: kinda annoying, but might be good to deny
Expand Down
1 change: 1 addition & 0 deletions src/body/chan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ impl Sender {

#[allow(dead_code)]
#[allow(clippy::unused_async_trait_impl)]
#[allow(clippy::map_err_ignore, reason="dead code")]
pub(crate) async fn send_trailers(&mut self, trailers: HeaderMap) -> crate::Result<()> {
self.try_send_trailers(trailers)
.map_err(|_| crate::Error::new_closed())
Expand Down
2 changes: 1 addition & 1 deletion src/common/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl Time {
Time::Timer(..) => Some(dur),
},
Dur::Configured(Some(dur)) => match self {
Time::Empty => panic!("timeout `{name}` set, but no timer set",),
Time::Empty => panic!("timeout `{name}` set, but no timer set"),
Time::Timer(..) => Some(dur),
},
Dur::Default(None) | Dur::Configured(None) => None,
Expand Down
2 changes: 1 addition & 1 deletion src/proto/h1/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ impl ChunkedState {
max_headers_bytes,
}: StepArgs<'_>,
) -> Poll<Result<ChunkedState, io::Error>> {
use self::ChunkedState::*;
use self::ChunkedState::{Start, Size, SizeLws, Extension, SizeLf, Body, BodyCr, BodyLf, Trailer, TrailerLf, EndCr, EndLf, End};
match *self {
Start => ChunkedState::read_start(cx, body, chunk_size),
Size => ChunkedState::read_size(cx, body, chunk_size),
Expand Down
5 changes: 0 additions & 5 deletions src/proto/h1/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,12 +534,7 @@ impl<B: Buf> WriteBuf<B> {
strategy,
}
}
}

impl<B> WriteBuf<B>
where
B: Buf,
{
fn set_strategy(&mut self, strategy: WriteStrategy) {
self.strategy = strategy;
}
Expand Down
2 changes: 2 additions & 0 deletions src/proto/h2/ping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,8 @@ impl Bdp {

// if the current `bytes` sample is at least 2/3 the previous
// bdp, increase to double the current sample.
#[allow(clippy::integer_division_remainder_used, reason="bdp heuristic, integer precision loss acceptable")]
#[allow(clippy::integer_division, reason="bdp heuristic, integer precision loss acceptable")]
if bytes >= self.bdp as usize * 2 / 3 {
self.bdp = (bytes * 2).min(BDP_LIMIT) as WindowSize;
trace!("BDP increased to {}", self.bdp);
Expand Down
3 changes: 1 addition & 2 deletions src/proto/h2/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ where
let ping = self
.ping
.as_ref()
.map(|ping| ping.0.clone())
.unwrap_or_else(ping::disabled);
.map_or_else(ping::disabled, |ping| ping.0.clone());

// Record the headers received
ping.record_non_data();
Expand Down
Loading