mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-12 10:46:07 +00:00
Address clippy warnings
This commit is contained in:
@@ -405,8 +405,8 @@ macro_rules! const_assert_eq {
|
||||
}
|
||||
|
||||
// Assert ABI layout
|
||||
const_assert_eq!(mem::size_of::<&Utf8CStr>(), mem::size_of::<[usize; 2]>());
|
||||
const_assert_eq!(mem::align_of::<&Utf8CStr>(), mem::align_of::<[usize; 2]>());
|
||||
const_assert_eq!(size_of::<&Utf8CStr>(), size_of::<[usize; 2]>());
|
||||
const_assert_eq!(align_of::<&Utf8CStr>(), align_of::<[usize; 2]>());
|
||||
|
||||
// File system path extensions types
|
||||
|
||||
@@ -471,7 +471,7 @@ impl<'a> FsPathBuf<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Deref for FsPathBuf<'a> {
|
||||
impl Deref for FsPathBuf<'_> {
|
||||
type Target = FsPath;
|
||||
|
||||
fn deref(&self) -> &FsPath {
|
||||
@@ -479,7 +479,7 @@ impl<'a> Deref for FsPathBuf<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> DerefMut for FsPathBuf<'a> {
|
||||
impl DerefMut for FsPathBuf<'_> {
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
FsPath::from_mut(&mut self.0)
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ impl Directory {
|
||||
unsafe {
|
||||
let entry = &*e;
|
||||
let d_name = CStr::from_ptr(entry.d_name.as_ptr());
|
||||
return if d_name == cstr!(".") || d_name == cstr!("..") {
|
||||
if d_name == cstr!(".") || d_name == cstr!("..") {
|
||||
self.read()
|
||||
} else {
|
||||
let e = DirEntry {
|
||||
@@ -342,7 +342,7 @@ impl Directory {
|
||||
d_name_len: d_name.to_bytes_with_nul().len(),
|
||||
};
|
||||
Ok(Some(e))
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user