Skip to content

Commit

Permalink
Remove various obselete allow directives
Browse files Browse the repository at this point in the history
  • Loading branch information
gretchenfrage committed Dec 22, 2024
1 parent c249f9e commit 23cb4eb
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 11 deletions.
2 changes: 0 additions & 2 deletions quinn-proto/src/congestion/cubic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ impl Controller for Cubic {
self.recovery_start_time = Some(now);

// Fast convergence
#[allow(clippy::branches_sharing_code)]
// https://github.com/rust-lang/rust-clippy/issues/7198
if (self.window as f64) < self.cubic_state.w_max {
self.cubic_state.w_max = self.window as f64 * (1.0 + BETA_CUBIC) / 2.0;
} else {
Expand Down
1 change: 0 additions & 1 deletion quinn-proto/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1763,7 +1763,6 @@ impl Connection {
result
}

#[allow(clippy::suspicious_operation_groupings)]
fn peer_completed_address_validation(&self) -> bool {
if self.side.is_server() || self.state.is_closed() {
return true;
Expand Down
1 change: 0 additions & 1 deletion quinn-proto/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,6 @@ impl IndexMut<ConnectionHandle> for Slab<ConnectionMeta> {
}

/// Event resulting from processing a single datagram
#[allow(clippy::large_enum_variant)] // Not passed around extensively
pub enum DatagramEvent {
/// The datagram is redirected to its `Connection`
ConnectionEvent(ConnectionHandle, ConnectionEvent),
Expand Down
1 change: 0 additions & 1 deletion quinn-proto/src/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,6 @@ mod test {
}

#[test]
#[allow(clippy::range_plus_one)]
fn ack_coding() {
const PACKETS: &[u64] = &[1, 2, 3, 5, 10, 11, 14];
let mut ranges = ArrayRangeSet::new();
Expand Down
1 change: 0 additions & 1 deletion quinn-proto/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,6 @@ fn congestion() {
pair.client_send(client_ch, s).write(&[42; 1024]).unwrap();
}

#[allow(clippy::field_reassign_with_default)] // https://github.com/rust-lang/rust-clippy/issues/6527
#[test]
fn high_latency_handshake() {
let _guard = subscribe();
Expand Down
3 changes: 1 addition & 2 deletions quinn/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ struct ConnectionDriver(ConnectionRef);
impl Future for ConnectionDriver {
type Output = Result<(), io::Error>;

#[allow(unused_mut)] // MSRV
fn poll(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Self::Output> {
fn poll(self: Pin<&mut Self>, cx: &mut Context) -> Poll<Self::Output> {
let conn = &mut *self.0.state.lock("poll");

let span = debug_span!("drive", id = conn.handle.0);
Expand Down
3 changes: 1 addition & 2 deletions quinn/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,7 @@ pub(crate) struct EndpointDriver(pub(crate) EndpointRef);
impl Future for EndpointDriver {
type Output = Result<(), io::Error>;

#[allow(unused_mut)] // MSRV
fn poll(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Self::Output> {
fn poll(self: Pin<&mut Self>, cx: &mut Context) -> Poll<Self::Output> {
let mut endpoint = self.0.state.lock().unwrap();
if endpoint.driver.is_none() {
endpoint.driver = Some(cx.waker().clone());
Expand Down
1 change: 0 additions & 1 deletion quinn/tests/many_connections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ fn hash_correct(data: &[u8], crc: &Crc<u32>) -> bool {
encoded_hash == actual_hash
}

#[allow(unsafe_code)]
fn random_vec(size: usize) -> Vec<u8> {
let mut ret = vec![0; size];
rand::thread_rng().fill_bytes(&mut ret[..]);
Expand Down

0 comments on commit 23cb4eb

Please sign in to comment.