Skip to content

Commit 2158845

Browse files
chore: clippy lint updates (#2914)
Co-authored-by: boquan-fang <178228860+boquan-fang@users.noreply.github.com> Co-authored-by: Boquan Fang <boquanfang3@gmail.com>
1 parent 1cab917 commit 2158845

8 files changed

Lines changed: 12 additions & 31 deletions

File tree

dc/s2n-quic-dc-metrics/src/test.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
use crate::counters_for_enum;
5-
64
// This has a very much shorter list than the actual enum - this is intentional, it tests that we
75
// handle non_exhaustive correctly.
86
counters_for_enum! {

quic/s2n-quic-core/src/buffer/reader/incremental.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use crate::{
66
reader::{storage::Chunk, Reader, Storage},
77
writer, Error,
88
},
9-
ensure,
109
varint::VarInt,
1110
};
1211

quic/s2n-quic-core/src/buffer/reader/storage/buf.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
use crate::{
5-
assume,
6-
buffer::{
7-
reader::{storage::Chunk, Storage},
8-
writer,
9-
},
10-
ensure,
4+
use crate::buffer::{
5+
reader::{storage::Chunk, Storage},
6+
writer,
117
};
128
use core::cmp::Ordering;
139

quic/s2n-quic-core/src/buffer/reader/storage/io_slice.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
use crate::{
5-
assume,
6-
buffer::{
7-
reader::{storage::Chunk, Storage},
8-
writer,
9-
},
4+
use crate::buffer::{
5+
reader::{storage::Chunk, Storage},
6+
writer,
107
};
118
use core::{cmp::Ordering, ops::ControlFlow};
129

quic/s2n-quic-core/src/buffer/reader/storage/slice.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@
88
unused_mut
99
)]
1010

11-
use crate::{
12-
buffer::{
13-
reader::{storage::Chunk, Storage},
14-
writer,
15-
},
16-
ensure,
11+
use crate::buffer::{
12+
reader::{storage::Chunk, Storage},
13+
writer,
1714
};
1815

1916
macro_rules! impl_slice {

quic/s2n-quic-core/src/buffer/writer/storage/limit.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
use crate::{
5-
assume,
6-
buffer::{reader::storage::Chunk, writer::Storage},
7-
};
4+
use crate::buffer::{reader::storage::Chunk, writer::Storage};
85
use bytes::{buf::UninitSlice, Bytes, BytesMut};
96

107
/// An implementation that limits the number of bytes that can be written to the underlying storage

quic/s2n-quic-core/src/buffer/writer/storage/uninit_slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
use crate::{assume, buffer::writer::Storage};
4+
use crate::buffer::writer::Storage;
55
use bytes::buf::UninitSlice;
66

77
impl Storage for &mut UninitSlice {

quic/s2n-quic-core/src/buffer/writer/storage/write_once.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
use crate::{
5-
buffer::{reader::storage::Chunk, writer::Storage},
6-
ensure,
7-
};
4+
use crate::buffer::{reader::storage::Chunk, writer::Storage};
85
use bytes::{buf::UninitSlice, Bytes, BytesMut};
96

107
/// Only allows a single write into the storage. After that, no more writes are allowed.

0 commit comments

Comments
 (0)