diff --git a/bench/src/stats.rs b/bench/src/stats.rs index 71762a2fc..0c81875c9 100644 --- a/bench/src/stats.rs +++ b/bench/src/stats.rs @@ -2,6 +2,7 @@ use std::time::Duration; use hdrhistogram::Histogram; +#[derive(Default)] pub struct Stats { pub total_size: usize, pub total_duration: Duration, @@ -9,17 +10,6 @@ pub struct Stats { pub stream_stats: StreamStats, } -impl Default for Stats { - fn default() -> Self { - Self { - total_size: Default::default(), - total_duration: Default::default(), - streams: Default::default(), - stream_stats: StreamStats::default(), - } - } -} - impl Stats { pub fn stream_finished(&mut self, stream_result: TransferResult) { self.total_size += stream_result.size; diff --git a/fuzz/fuzz_targets/streams.rs b/fuzz/fuzz_targets/streams.rs index 491f070cd..a8659e6e5 100644 --- a/fuzz/fuzz_targets/streams.rs +++ b/fuzz/fuzz_targets/streams.rs @@ -6,7 +6,6 @@ use libfuzzer_sys::fuzz_target; extern crate proto; use proto::fuzzing::{ ConnectionState, ResetStream, Retransmits, SendStream, Streams, StreamsState, - TransportParameters, }; use proto::{Dir, Side, StreamId, VarInt}; @@ -19,7 +18,6 @@ struct StreamParams { receive_window: u16, stream_receive_window: u16, dir: Dir, - transport_params: TransportParameters, } #[derive(Arbitrary, Debug)] diff --git a/perf/src/stats.rs b/perf/src/stats.rs index a0e201d88..2f6aa8bdb 100644 --- a/perf/src/stats.rs +++ b/perf/src/stats.rs @@ -261,7 +261,7 @@ mod json { intervals: &stats .intervals .iter() - .map(|interval| Interval::from_stats_interval(interval)) + .map(Interval::from_stats_interval) .collect(), }; diff --git a/quinn-proto/src/connection/spaces.rs b/quinn-proto/src/connection/spaces.rs index 41043e829..e0f06c13f 100644 --- a/quinn-proto/src/connection/spaces.rs +++ b/quinn-proto/src/connection/spaces.rs @@ -221,7 +221,7 @@ pub(crate) struct SentPacket { } /// Retransmittable data queue -#[derive(Debug, Clone)] +#[derive(Debug, Default, Clone)] pub struct Retransmits { pub(crate) max_data: bool, pub(crate) max_uni_stream_id: bool, @@ -253,23 +253,6 @@ impl Retransmits { } } -impl Default for Retransmits { - fn default() -> Self { - Self { - max_data: false, - max_uni_stream_id: false, - max_bi_stream_id: false, - reset_stream: Vec::new(), - stop_sending: Vec::new(), - max_stream_data: FxHashSet::default(), - crypto: VecDeque::new(), - new_cids: Vec::new(), - retire_cids: Vec::new(), - handshake_done: false, - } - } -} - impl ::std::ops::BitOrAssign for Retransmits { fn bitor_assign(&mut self, rhs: Self) { // We reduce in-stream head-of-line blocking by queueing retransmits before other data for