chiark / gitweb /
clippy: Suppress a lot of lints
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 4 Feb 2024 12:38:29 +0000 (12:38 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 4 Feb 2024 14:26:16 +0000 (14:26 +0000)
src/main.rs

index 3ad7311e0d23558a236b29e1e380ef23853c3647..ed1bb1422b63081dc5c628e2d7d98ea8f0f3907b 100644 (file)
@@ -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;