From 776432978ca87da98d6b08c2415e7bdadc2eb185 Mon Sep 17 00:00:00 2001 From: teor Date: Wed, 22 Sep 2021 23:43:27 +1000 Subject: [PATCH] Allow deliberate instances of the clippy::derivable_impls lint (#2788) * Allow deliberate instances of the new nightly clippy::derivable_impls lint We want our config defaults to be explicit. Not so sure about the application defaults, but they also contain a config. * Also allow unknown lint names Stable doesn't know about this lint, but nightly does. --- zebra-consensus/src/config.rs | 3 +++ zebrad/src/application.rs | 2 ++ zebrad/src/config.rs | 3 +++ 3 files changed, 8 insertions(+) diff --git a/zebra-consensus/src/config.rs b/zebra-consensus/src/config.rs index ba03da993..f766ee578 100644 --- a/zebra-consensus/src/config.rs +++ b/zebra-consensus/src/config.rs @@ -14,6 +14,9 @@ pub struct Config { pub checkpoint_sync: bool, } +// we like our default configs to be explicit +#[allow(unknown_lints)] +#[allow(clippy::derivable_impls)] impl Default for Config { fn default() -> Self { Self { diff --git a/zebrad/src/application.rs b/zebrad/src/application.rs index e087b6d87..3543595ea 100644 --- a/zebrad/src/application.rs +++ b/zebrad/src/application.rs @@ -125,6 +125,8 @@ impl ZebradApp { /// /// By default no configuration is loaded, and the framework state is /// initialized to a default, empty state (no components, threads, etc). +#[allow(unknown_lints)] +#[allow(clippy::derivable_impls)] impl Default for ZebradApp { fn default() -> Self { Self { diff --git a/zebrad/src/config.rs b/zebrad/src/config.rs index 963c37d4e..5c4b9f604 100644 --- a/zebrad/src/config.rs +++ b/zebrad/src/config.rs @@ -133,6 +133,9 @@ pub struct MetricsSection { pub endpoint_addr: Option, } +// we like our default configs to be explicit +#[allow(unknown_lints)] +#[allow(clippy::derivable_impls)] impl Default for MetricsSection { fn default() -> Self { Self {