mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-11 05:31:14 -03:00
Fix some clipplies
This commit is contained in:
@@ -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]));
|
||||
}
|
||||
|
||||
@@ -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 ..,
|
||||
|
||||
Reference in New Issue
Block a user