Skip to content

Commit 65598a1

Browse files
committed
Fix cargo clippy when spdm_attestation feature is enabled
And add cargo clippy check with spdm_attestation enabled in CI.
1 parent b212d2b commit 65598a1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/format.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- name: Run rust-clippy for result collection
5656
run:
5757
cargo clippy
58-
--features stack-guard,virtio-vsock,virtio-serial,vmcall-interrupt
58+
--features stack-guard,virtio-vsock,virtio-serial,vmcall-interrupt,spdm_attestation
5959
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
6060
continue-on-error: true
6161

@@ -66,7 +66,7 @@ jobs:
6666
wait-for-processing: true
6767

6868
- name: Run rust-clippy
69-
run: cargo clippy --features stack-guard,virtio-vsock,virtio-serial,vmcall-interrupt
69+
run: cargo clippy --features stack-guard,virtio-vsock,virtio-serial,vmcall-interrupt,spdm_attestation
7070

7171
rustfmt:
7272
name: Format

src/attestation/src/ghci.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub extern "C" fn servtd_get_quote(tdquote_req_buf: *mut c_void, len: u64) -> i3
4646

4747
let _ = tdvmcall_get_quote(shared.as_mut_bytes()).map_err(|e| {
4848
log::error!("tdvmcall_get_quote failed with error: {:?}\n", e);
49-
return AttestLibError::QuoteFailure as i32;
49+
AttestLibError::QuoteFailure as i32
5050
});
5151

5252
if let Err(err) = wait_for_quote_completion(notify_registered, shared.as_bytes()) {
@@ -69,9 +69,9 @@ fn set_vmm_notification() -> bool {
6969
NOTIFY_VECTOR as usize,
7070
InterruptCallback::new(vmm_notification),
7171
)
72-
.map_err(|e| {
72+
.map_err(|_e| {
7373
log::error!("Fail to setup interrupt callback for VMM notify\n");
74-
return false;
74+
false
7575
});
7676

7777
// Setup event notifier

0 commit comments

Comments
 (0)