Fix some clipplies

This commit is contained in:
Peter Ammon
2025-03-08 10:52:27 -08:00
parent 2930c85926
commit 2ecd0d011b
2 changed files with 2 additions and 2 deletions

View File

@@ -1697,5 +1697,5 @@ fn parse_hex(hex: &[u8]) -> Option<Vec<u8>> {
#[test]
fn test_parse_hex() {
assert_eq!(parse_hex(&[b'3', b'd']), Some(vec![61]));
assert_eq!(parse_hex(b"3d"), Some(vec![61]));
}

View File

@@ -272,7 +272,7 @@ pub fn next(&mut self) -> Option<io::Result<&DirEntry>> {
// TODO: This should use &raw from Rust 1.82 on
// https://github.com/rust-lang/libc/issues/2669
// https://github.com/fish-shell/fish-shell/issues/11221
let d_name_ptr = addr_of!((*dent).d_name);
let d_name_ptr = addr_of!(dent.d_name);
let d_name = unsafe { std::ffi::CStr::from_ptr(d_name_ptr.cast()) }.to_bytes();
// Skip . and ..,