From e922eaa428888cca97de1e97ad616cd2b2d11910 Mon Sep 17 00:00:00 2001 From: Zhang Junyang Date: Sun, 24 Dec 2023 11:44:45 +0800 Subject: [PATCH] Fix errors raised by the new clippy --- Cargo.toml | 1 + framework/aster-frame/src/lib.rs | 1 - .../aster-std/src/process/program_loader/elf/init_stack.rs | 4 ++-- services/libs/keyable-arc/src/lib.rs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 18f5270c6..03a433b9e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,6 +37,7 @@ members = [ "framework/aster-frame/src/arch/x86/boot/linux_boot/setup", "framework/libs/align_ext", "framework/libs/boot-wrapper/builder", + "framework/libs/boot-wrapper/linux-boot-params", "framework/libs/boot-wrapper/wrapper", "framework/libs/ktest", "framework/libs/tdx-guest", diff --git a/framework/aster-frame/src/lib.rs b/framework/aster-frame/src/lib.rs index 1c35b5788..9486c2259 100644 --- a/framework/aster-frame/src/lib.rs +++ b/framework/aster-frame/src/lib.rs @@ -3,7 +3,6 @@ #![feature(const_mut_refs)] #![feature(const_ptr_sub_ptr)] #![feature(const_trait_impl)] -#![feature(core_intrinsics)] #![feature(coroutines)] #![feature(fn_traits)] #![feature(iter_from_coroutine)] diff --git a/services/libs/aster-std/src/process/program_loader/elf/init_stack.rs b/services/libs/aster-std/src/process/program_loader/elf/init_stack.rs index 3d53b8053..3dce8da1d 100644 --- a/services/libs/aster-std/src/process/program_loader/elf/init_stack.rs +++ b/services/libs/aster-std/src/process/program_loader/elf/init_stack.rs @@ -140,8 +140,8 @@ impl InitStack { fn adjust_stack_alignment( &mut self, root_vmar: &Vmar, - envp_pointers: &Vec, - argv_pointers: &Vec, + envp_pointers: &[u64], + argv_pointers: &[u64], aux_vec: &AuxVec, ) -> Result<()> { // ensure 8-byte alignment diff --git a/services/libs/keyable-arc/src/lib.rs b/services/libs/keyable-arc/src/lib.rs index d768daf2f..c96b71093 100644 --- a/services/libs/keyable-arc/src/lib.rs +++ b/services/libs/keyable-arc/src/lib.rs @@ -179,7 +179,7 @@ impl From> for Arc { impl PartialEq for KeyableArc { fn eq(&self, other: &Self) -> bool { - Arc::as_ptr(&self.0) == Arc::as_ptr(&other.0) + core::ptr::eq(Arc::as_ptr(&self.0), Arc::as_ptr(&other.0)) } } @@ -270,7 +270,7 @@ impl KeyableWeak { impl PartialEq for KeyableWeak { fn eq(&self, other: &Self) -> bool { - self.0.as_ptr() == other.0.as_ptr() + core::ptr::eq(self.0.as_ptr(), other.0.as_ptr()) } }