From 2ecd0d011bb4c5b13918cbd78f81aa085e9184ff Mon Sep 17 00:00:00 2001 From: Peter Ammon Date: Sat, 8 Mar 2025 10:52:27 -0800 Subject: [PATCH] Fix some clipplies --- src/input_common.rs | 2 +- src/wutil/dir_iter.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input_common.rs b/src/input_common.rs index 3cdf5b6ed..e11b557d8 100644 --- a/src/input_common.rs +++ b/src/input_common.rs @@ -1697,5 +1697,5 @@ fn parse_hex(hex: &[u8]) -> Option> { #[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])); } diff --git a/src/wutil/dir_iter.rs b/src/wutil/dir_iter.rs index fb8932bec..ddcc80c6e 100644 --- a/src/wutil/dir_iter.rs +++ b/src/wutil/dir_iter.rs @@ -272,7 +272,7 @@ pub fn next(&mut self) -> Option> { // 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 ..,