From 7179151d0dec384a1700777c0444443c6cd2f37b Mon Sep 17 00:00:00 2001 From: OuyangHang33 Date: Mon, 18 Mar 2024 09:51:04 +0800 Subject: [PATCH] clean clippy -A clippy::derivable_impls paraments Signed-off-by: OuyangHang33 --- .github/workflows/format.yml | 4 ++-- mctp_transport/src/header.rs | 1 + sh_script/build.sh | 4 ++-- spdmlib/src/common/mod.rs | 1 + spdmlib/src/common/session.rs | 1 + spdmlib/src/message/measurement.rs | 1 + spdmlib/src/protocol/algo.rs | 1 + 7 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index ffe38a1..dccaec0 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -30,7 +30,7 @@ jobs: uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3 with: command: clippy - args: -- -D warnings -A clippy::only-used-in-recursion -A incomplete-features -A clippy::bad_bit_mask -A clippy::derivable_impls + args: -- -D warnings -A clippy::bad_bit_mask rustfmt: name: Format @@ -103,4 +103,4 @@ jobs: uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3 with: command: clippy - args: -- -D warnings -A clippy::only-used-in-recursion -A incomplete-features -A clippy::bad_bit_mask -A clippy::derivable_impls \ No newline at end of file + args: -- -D warnings -A clippy::bad_bit_mask \ No newline at end of file diff --git a/mctp_transport/src/header.rs b/mctp_transport/src/header.rs index 666ec20..aefa0f8 100644 --- a/mctp_transport/src/header.rs +++ b/mctp_transport/src/header.rs @@ -31,6 +31,7 @@ enum_builder! { MctpMessageTypeVendorDefinedIana => 0x7F } } +#[allow(clippy::derivable_impls)] impl Default for MctpMessageType { fn default() -> MctpMessageType { MctpMessageType::MctpMessageTypeMctpControl diff --git a/sh_script/build.sh b/sh_script/build.sh index 016b32b..254595b 100755 --- a/sh_script/build.sh +++ b/sh_script/build.sh @@ -33,12 +33,12 @@ check() { set -x cargo check cargo fmt --all -- --check - cargo clippy -- -D warnings -A clippy::only-used-in-recursion -A incomplete-features -A clippy::bad_bit_mask -A clippy::derivable_impls + cargo clippy -- -D warnings -A clippy::bad_bit_mask if [ "${RUNNER_OS:-Linux}" == "Linux" ]; then pushd spdmlib_crypto_mbedtls cargo check - cargo clippy -- -D warnings -A clippy::only-used-in-recursion -A incomplete-features -A clippy::bad_bit_mask -A clippy::derivable_impls + cargo clippy -- -D warnings -A clippy::bad_bit_mask popd fi set +x diff --git a/spdmlib/src/common/mod.rs b/spdmlib/src/common/mod.rs index fba4cdc..aa2f524 100644 --- a/spdmlib/src/common/mod.rs +++ b/spdmlib/src/common/mod.rs @@ -50,6 +50,7 @@ enum_builder! { SpdmConnectionAuthenticated => 0x5 } } +#[allow(clippy::derivable_impls)] impl Default for SpdmConnectionState { fn default() -> SpdmConnectionState { SpdmConnectionState::SpdmConnectionNotStarted diff --git a/spdmlib/src/common/session.rs b/spdmlib/src/common/session.rs index 42e2790..a1acadc 100644 --- a/spdmlib/src/common/session.rs +++ b/spdmlib/src/common/session.rs @@ -28,6 +28,7 @@ enum_builder! { SpdmSessionEstablished => 0x2 } } +#[allow(clippy::derivable_impls)] impl Default for SpdmSessionState { fn default() -> SpdmSessionState { SpdmSessionState::SpdmSessionNotStarted diff --git a/spdmlib/src/message/measurement.rs b/spdmlib/src/message/measurement.rs index 260533d..37ece0b 100644 --- a/spdmlib/src/message/measurement.rs +++ b/spdmlib/src/message/measurement.rs @@ -46,6 +46,7 @@ enum_builder! { SpdmMeasurementRequestAll => 0xFF } } +#[allow(clippy::derivable_impls)] impl Default for SpdmMeasurementOperation { fn default() -> SpdmMeasurementOperation { SpdmMeasurementOperation::SpdmMeasurementQueryTotalNumber diff --git a/spdmlib/src/protocol/algo.rs b/spdmlib/src/protocol/algo.rs index beec5ea..41cfe21 100644 --- a/spdmlib/src/protocol/algo.rs +++ b/spdmlib/src/protocol/algo.rs @@ -741,6 +741,7 @@ enum_builder! { SpdmMeasurementSummaryHashTypeAll => 0xFF } } +#[allow(clippy::derivable_impls)] impl Default for SpdmMeasurementSummaryHashType { fn default() -> SpdmMeasurementSummaryHashType { SpdmMeasurementSummaryHashType::SpdmMeasurementSummaryHashTypeNone