From 7b46d061716647892b988a8df64f96ba6b3edc5a Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Tue, 26 Dec 2023 16:07:38 +0800 Subject: [PATCH] build: fix clippy ptr arg issue CI reports errors: error: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> arch/src/x86_64/mod.rs:1351:19 | 1351 | epc_sections: &Vec, | ^^^^^^^^^^^^^^^^^^^ help: change this to: `&[SgxEpcSection]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg = note: `-D clippy::ptr-arg` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::ptr_arg)]` Signed-off-by: Yi Wang (cherry picked from commit 3d6594a594f734f50f82191eb06ed3d5a91b9856) --- arch/src/x86_64/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/src/x86_64/mod.rs b/arch/src/x86_64/mod.rs index 6827ec34d..4390fd3ee 100644 --- a/arch/src/x86_64/mod.rs +++ b/arch/src/x86_64/mod.rs @@ -1311,7 +1311,7 @@ fn update_cpuid_topology( // sections exposed to the guest. fn update_cpuid_sgx( cpuid: &mut Vec, - epc_sections: &Vec, + epc_sections: &[SgxEpcSection], ) -> Result<(), Error> { // Something's wrong if there's no EPC section. if epc_sections.is_empty() {