Skip to content

Commit c5e6242

Browse files
authored
chore: remove unneeded clippy allows (#2326)
1 parent 3d590ec commit c5e6242

File tree

80 files changed

+2
-107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2
-107
lines changed

clippy.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
too-many-arguments-threshold = 12
2+
allow-expect-in-tests = true
3+
allow-unwrap-in-tests = true
24
disallowed-methods = [
35
{ path = "bincode::deserialize_from", reason = "bincode::deserialize_from() is not safe to use on untrusted data, since the method will read a u64 length value from the first 8 bytes of the serialized payload and will then attempt to allocate this number of bytes without any validation." },
46
{ path = "std::io::Write::write", reason = "`Write::write()` may not write the entire buffer. Use `Write::write_all()` instead. Or, if you are intentionally using `Write::write()`, use `#[allow(clippy::disallowed_methods)]` to locally disable this check." },

rs/artifact_pool/src/inmemory_pool.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ where
179179

180180
// returning the iterator directly isn't trusted due to the use of `self` in the
181181
// closure
182-
#[allow(clippy::needless_collect)]
183182
let vec: Vec<T> = heights.flat_map(|h| self.get_by_height(*h)).collect();
184183
Box::new(vec.into_iter())
185184
}

rs/bitcoin/ckbtc/minter/src/guard.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ mod tests {
166166
}
167167

168168
#[test]
169-
#[allow(clippy::needless_collect)]
170169
fn guard_prevents_more_than_max_concurrent_principals() {
171170
// test that at most MAX_CONCURRENT guards can be created if each one
172171
// is for a different principal

rs/crypto/internal/crypto_lib/basic_sig/der_utils/src/tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![allow(clippy::unwrap_used)]
21
use super::*;
32
use simple_asn1::oid;
43

rs/crypto/internal/crypto_lib/basic_sig/ecdsa_secp256k1/tests/api_tests.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(clippy::unwrap_used)]
2-
31
use ic_crypto_internal_basic_sig_ecdsa_secp256k1::{types, *};
42

53
// SECP256K1_PK_1_DER_HEX was generated via the following commands:

rs/crypto/internal/crypto_lib/basic_sig/ed25519/src/api/tests.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(clippy::unwrap_used)]
2-
31
mod keygen {
42
use crate::keypair_from_rng;
53
use ic_crypto_internal_test_vectors::unhex::hex_to_32_bytes;

rs/crypto/internal/crypto_lib/basic_sig/ed25519/src/types/conversions/protobuf/tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![allow(clippy::unwrap_used)]
21
use super::*;
32

43
#[test]

rs/crypto/internal/crypto_lib/basic_sig/iccsa/src/types/conversions/tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![allow(clippy::unwrap_used)]
21
use crate::types::conversions::PublicKeyFromBytesError;
32
use crate::types::PublicKey;
43
use crate::types::PublicKeyBytes;

rs/crypto/internal/crypto_lib/basic_sig/iccsa/tests/api.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![allow(clippy::unwrap_used)]
21
use assert_matches::assert_matches;
32
use ic_certification_test_utils::serialize_to_cbor;
43
use ic_crypto_internal_basic_sig_iccsa::types::*;

rs/crypto/internal/crypto_lib/multi_sig/bls12_381/src/tests.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(clippy::unwrap_used)]
2-
31
//! Tests for multisignatures
42
53
use crate::{

0 commit comments

Comments
 (0)