From: Matt Corallo Date: Wed, 23 Oct 2024 15:59:23 +0000 (+0000) Subject: Allow `clippy::unwrap-or-default` because its usually wrong X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=4741653f76c650f31065f6f614ec37d8625cf0f5;p=rust-lightning Allow `clippy::unwrap-or-default` because its usually wrong `or_default` is generally less readable than writing out the thing we're writing, as `Default` is opaque but explicit constructors generally are not. Thus, we ignore the clippy lint (ideally we could invert it and ban the use of `Default` in the crate entirely but alas). --- diff --git a/ci/check-lint.sh b/ci/check-lint.sh index a0e467192..b20690707 100755 --- a/ci/check-lint.sh +++ b/ci/check-lint.sh @@ -2,6 +2,8 @@ set -e set -x RUSTFLAGS='-D warnings' cargo clippy -- \ + `# Things where clippy is just wrong` \ + -A clippy::unwrap-or-default \ `# Errors` \ -A clippy::erasing_op \ -A clippy::never_loop \