Skip to content

Commit 99d67de

Browse files
committed
rust: Adjust what lints we consider globally acceptable
1 parent 0155dee commit 99d67de

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,17 @@ format-md: ## Format all markdown and MDX files to wrap at 80 characters
246246

247247
.PHONY: lint
248248
lint: ## Run linter (clippy)
249-
cargo clippy --all-targets -- -D warnings --allow clippy::mutable_key_type
249+
cargo clippy --all-targets -- -D warnings \
250+
--allow clippy::large_enum_variant \
251+
--allow clippy::result-large-err \
252+
--allow unused
250253

251254
.PHONY: lint-beta
252255
lint-beta: ## Run linter (clippy) using beta Rust
253-
cargo +beta clippy --all-targets -- -D warnings --allow clippy::mutable_key_type
256+
cargo +beta clippy --all-targets -- -D warnings \
257+
--allow clippy::large_enum_variant \
258+
--allow clippy::result-large-err \
259+
--allow unused
254260

255261
.PHONY: lint-bash
256262
lint-bash: ## Check all shell scripts using shellcheck

ledger/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@
9797
#![allow(clippy::len_without_is_empty)]
9898
#![allow(clippy::result_unit_err)]
9999
// #![forbid(clippy::needless_pass_by_ref_mut)]
100+
#![allow(
101+
clippy::mutable_key_type,
102+
reason = "Deep within ValidCommandWithHash (used by TransactionPool) is a MutableFp that should probably be just Fp. Deserialize will not trigger UB. Remove this allow when fixed"
103+
)]
100104

101105
// Unused, we don't want to print on stdout
102106
// /// Print logs on stdout with the prefix `[ledger]`

vendor/redux/src/callback.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub struct AnyAction(pub Box<dyn std::any::Any>);
1111
#[distributed_slice]
1212
pub static CALLBACKS: [(&str, fn(&str, Box<dyn std::any::Any>) -> AnyAction)];
1313

14-
#[derive(PartialEq, Eq, Clone, Debug, Serialize, Deserialize)]
14+
#[derive(Clone, Debug, Serialize, Deserialize)]
1515
pub struct Callback<T> {
1616
#[serde(skip, default = "default_fun_ptr")]
1717
fun_ptr: Option<fn(T) -> AnyAction>,

0 commit comments

Comments
 (0)