Fix errors raised by the new clippy

This commit is contained in:
Zhang Junyang 2023-12-24 11:44:45 +08:00 committed by Tate, Hongliang Tian
parent 94f8914a5e
commit e922eaa428
4 changed files with 5 additions and 5 deletions

View File

@ -37,6 +37,7 @@ members = [
"framework/aster-frame/src/arch/x86/boot/linux_boot/setup", "framework/aster-frame/src/arch/x86/boot/linux_boot/setup",
"framework/libs/align_ext", "framework/libs/align_ext",
"framework/libs/boot-wrapper/builder", "framework/libs/boot-wrapper/builder",
"framework/libs/boot-wrapper/linux-boot-params",
"framework/libs/boot-wrapper/wrapper", "framework/libs/boot-wrapper/wrapper",
"framework/libs/ktest", "framework/libs/ktest",
"framework/libs/tdx-guest", "framework/libs/tdx-guest",

View File

@ -3,7 +3,6 @@
#![feature(const_mut_refs)] #![feature(const_mut_refs)]
#![feature(const_ptr_sub_ptr)] #![feature(const_ptr_sub_ptr)]
#![feature(const_trait_impl)] #![feature(const_trait_impl)]
#![feature(core_intrinsics)]
#![feature(coroutines)] #![feature(coroutines)]
#![feature(fn_traits)] #![feature(fn_traits)]
#![feature(iter_from_coroutine)] #![feature(iter_from_coroutine)]

View File

@ -140,8 +140,8 @@ impl InitStack {
fn adjust_stack_alignment( fn adjust_stack_alignment(
&mut self, &mut self,
root_vmar: &Vmar<Full>, root_vmar: &Vmar<Full>,
envp_pointers: &Vec<u64>, envp_pointers: &[u64],
argv_pointers: &Vec<u64>, argv_pointers: &[u64],
aux_vec: &AuxVec, aux_vec: &AuxVec,
) -> Result<()> { ) -> Result<()> {
// ensure 8-byte alignment // ensure 8-byte alignment

View File

@ -179,7 +179,7 @@ impl<T: ?Sized> From<KeyableArc<T>> for Arc<T> {
impl<T: ?Sized> PartialEq for KeyableArc<T> { impl<T: ?Sized> PartialEq for KeyableArc<T> {
fn eq(&self, other: &Self) -> bool { 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<T: ?Sized> KeyableWeak<T> {
impl<T: ?Sized> PartialEq for KeyableWeak<T> { impl<T: ?Sized> PartialEq for KeyableWeak<T> {
fn eq(&self, other: &Self) -> bool { 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())
} }
} }