From 255059124af95c2473b3161a84ba0662ab91ac49 Mon Sep 17 00:00:00 2001 From: Brad Campbell Date: Thu, 16 Jan 2025 10:19:12 -0500 Subject: [PATCH] cargo.toml: clippy: add comments explaining lints --- Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 7e663f52d3..a1a6dea2d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -158,9 +158,15 @@ manual_unwrap_or_default = "allow" # COMPLEXITY LINTS complexity = { level = "deny", priority = -1 } +# Subjective, and complex functions may need many arguments. too_many_arguments = "allow" +# This is pretty sensitive, even `Result`s with returned buffers trigger this. +# It is not worth us creating types for all of these. type_complexity = "allow" +# We use options extensively and they can be as clear as if let statements. option_map_unit_fn = "allow" +# Sometimes the semantic meaning of variables means it is more clear to use +# nonminimal if statements, particularly when matching hardware or datasheets. nonminimal_bool = "allow" identity-op = "allow" while-let-loop = "allow"