Skip to content

Commit

Permalink
clean clippy -A clippy::derivable_impls paraments
Browse files Browse the repository at this point in the history
Signed-off-by: OuyangHang33 <[email protected]>
  • Loading branch information
OuyangHang33 committed Mar 18, 2024
1 parent 2c4e480 commit 7179151
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
args: -- -D warnings -A clippy::bad_bit_mask
1 change: 1 addition & 0 deletions mctp_transport/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ enum_builder! {
MctpMessageTypeVendorDefinedIana => 0x7F
}
}
#[allow(clippy::derivable_impls)]
impl Default for MctpMessageType {
fn default() -> MctpMessageType {
MctpMessageType::MctpMessageTypeMctpControl
Expand Down
4 changes: 2 additions & 2 deletions sh_script/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions spdmlib/src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ enum_builder! {
SpdmConnectionAuthenticated => 0x5
}
}
#[allow(clippy::derivable_impls)]
impl Default for SpdmConnectionState {
fn default() -> SpdmConnectionState {
SpdmConnectionState::SpdmConnectionNotStarted
Expand Down
1 change: 1 addition & 0 deletions spdmlib/src/common/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ enum_builder! {
SpdmSessionEstablished => 0x2
}
}
#[allow(clippy::derivable_impls)]
impl Default for SpdmSessionState {
fn default() -> SpdmSessionState {
SpdmSessionState::SpdmSessionNotStarted
Expand Down
1 change: 1 addition & 0 deletions spdmlib/src/message/measurement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ enum_builder! {
SpdmMeasurementRequestAll => 0xFF
}
}
#[allow(clippy::derivable_impls)]
impl Default for SpdmMeasurementOperation {
fn default() -> SpdmMeasurementOperation {
SpdmMeasurementOperation::SpdmMeasurementQueryTotalNumber
Expand Down
1 change: 1 addition & 0 deletions spdmlib/src/protocol/algo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,7 @@ enum_builder! {
SpdmMeasurementSummaryHashTypeAll => 0xFF
}
}
#[allow(clippy::derivable_impls)]
impl Default for SpdmMeasurementSummaryHashType {
fn default() -> SpdmMeasurementSummaryHashType {
SpdmMeasurementSummaryHashType::SpdmMeasurementSummaryHashTypeNone
Expand Down

0 comments on commit 7179151

Please sign in to comment.