From 711354a40be7bdd669c46d8c1f3d51dc678f860e Mon Sep 17 00:00:00 2001 From: Boshen Date: Tue, 7 Mar 2023 21:23:54 +0800 Subject: [PATCH] chore(rust): allow clippy::missing_const_for_fn --- .cargo/config.toml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index cf02899d4..166d78112 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -16,11 +16,20 @@ rustflags = [ "-Wclippy::all", # I want to write the best Rust code so both pedantic and nursery is enabled. - # We should only disable rules globally if they are: false positives, chaotic, or does not make sense. + # We should only disable rules globally if they are either false positives, chaotic, or does not make sense. "-Wclippy::pedantic", "-Wclippy::nursery", "-Wclippy::dbg_macro", - "-Aclippy::module_name_repetitions" + # pedantic + + # This rule is too pedantic, I don't want to force this because naming things are hard. + "-Aclippy::module_name_repetitions", + + # nursery rules + + # `const` functions do not make sense for our project because this is not a `const` library. + # This rule also confuses new comers and forces them to add `const` blindlessly without any reason. + "-Aclippy::missing_const_for_fn" ]