From: Ian Jackson Date: Sun, 4 Feb 2024 12:38:29 +0000 (+0000) Subject: clippy: Suppress a lot of lints X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=a23a5aedfbb5efd7edc558000146bfae5f792fc5;p=mastodonochrome.git clippy: Suppress a lot of lints --- diff --git a/src/main.rs b/src/main.rs index 3ad7311..ed1bb14 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,22 @@ +// These allows should be in a [lints] in Cargo.toml, +// which was stabilised in Rust 1.74. So maybe not do that yet. + +// Non-minimal coding patterns we sometimes use for clarity +#![allow(clippy::collapsible_if)] +#![allow(clippy::single_match)] +#![allow(clippy::let_and_return)] +#![allow(clippy::redundant_closure_call)] +#![allow(clippy::needless_question_mark)] +#![allow(clippy::len_zero)] +#![allow(clippy::needless_borrows_for_generic_args)] +#![allow(clippy::wildcard_in_or_patterns)] +// Things we might do for uniformity/generality which the compiler will +// optimise, but which clippy wants to normalise into a less general case +#![allow(clippy::single_char_pattern)] +#![allow(clippy::useless_format)] +#![allow(clippy::needless_borrow)] +#![allow(clippy::redundant_closure)] + use clap::Parser; use std::process::ExitCode;