From c23a257f3ca426518c1849ef992b88010a025391 Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Wed, 15 Apr 2026 00:55:45 +0200 Subject: [PATCH] clippy: Configure lint `unwrap_used` By setting `allow-unwrap-in-tests`, we can avoid repeating `allow(clippy::unwrap_used)` many times over. --- clippy.toml | 1 + crates/radicle/src/cob/test.rs | 1 - crates/radicle/src/storage/refs/sigrefs/git/properties.rs | 2 -- crates/radicle/src/storage/refs/sigrefs/property.rs | 2 -- crates/radicle/src/storage/refs/sigrefs/read/test.rs | 2 -- crates/radicle/src/storage/refs/sigrefs/write/test.rs | 2 -- 6 files changed, 1 insertion(+), 9 deletions(-) create mode 100644 clippy.toml diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 00000000..4da81ba1 --- /dev/null +++ b/clippy.toml @@ -0,0 +1 @@ +allow-unwrap-in-tests = true \ No newline at end of file diff --git a/crates/radicle/src/cob/test.rs b/crates/radicle/src/cob/test.rs index 7a1c9654..b2c50a93 100644 --- a/crates/radicle/src/cob/test.rs +++ b/crates/radicle/src/cob/test.rs @@ -1,4 +1,3 @@ -#![allow(clippy::unwrap_used)] use std::marker::PhantomData; use std::ops::Deref; diff --git a/crates/radicle/src/storage/refs/sigrefs/git/properties.rs b/crates/radicle/src/storage/refs/sigrefs/git/properties.rs index 55fbba87..be9eb2a7 100644 --- a/crates/radicle/src/storage/refs/sigrefs/git/properties.rs +++ b/crates/radicle/src/storage/refs/sigrefs/git/properties.rs @@ -1,5 +1,3 @@ -#![allow(clippy::unwrap_used)] - use crypto::{signature, test::signer::MockSigner, PublicKey, Signer as _}; use qcheck::TestResult; use qcheck_macros::quickcheck; diff --git a/crates/radicle/src/storage/refs/sigrefs/property.rs b/crates/radicle/src/storage/refs/sigrefs/property.rs index 39e5f8a5..917e7e67 100644 --- a/crates/radicle/src/storage/refs/sigrefs/property.rs +++ b/crates/radicle/src/storage/refs/sigrefs/property.rs @@ -1,5 +1,3 @@ -#![allow(clippy::unwrap_used)] - mod mock; use mock::*; diff --git a/crates/radicle/src/storage/refs/sigrefs/read/test.rs b/crates/radicle/src/storage/refs/sigrefs/read/test.rs index 49872d2c..9e8d8357 100644 --- a/crates/radicle/src/storage/refs/sigrefs/read/test.rs +++ b/crates/radicle/src/storage/refs/sigrefs/read/test.rs @@ -1,5 +1,3 @@ -#![allow(clippy::unwrap_used)] - mod mock; mod commit_reader; diff --git a/crates/radicle/src/storage/refs/sigrefs/write/test.rs b/crates/radicle/src/storage/refs/sigrefs/write/test.rs index f65969c4..a727f416 100644 --- a/crates/radicle/src/storage/refs/sigrefs/write/test.rs +++ b/crates/radicle/src/storage/refs/sigrefs/write/test.rs @@ -1,5 +1,3 @@ -#![allow(clippy::unwrap_used)] - mod mock; mod commit_writer;