Skip to content

Commit d5c6504

Browse files
authored
Update dir.rs
fixed feature flags due to multi-arch tests, thanks!
1 parent 16eb9a6 commit d5c6504

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dir.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ impl Entry {
302302

303303
/// Returns the bare file name of this directory entry without any other leading path component.
304304
///
305-
#[cfg(target_arch = "x86_64")]//this specific change only tested on very limited systems, I'm unaware of any other systems that have this issue
305+
#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
306306
///PLEASE REMOVE THESE COMMENTS (OBVIOUSLY WHEN DONE))
307307
/// This utilises a constant-time constant function strlen implementation that's faster than `libc::strlen`` (std library internal implementation)
308308
/// The function used is described at the bottom of the file. Benchmarks at
@@ -317,7 +317,7 @@ impl Entry {
317317
}
318318
}
319319

320-
#[cfg(not(target_arch = "x86_64"))]
320+
#[cfg(not(all(target_os = "linux", target_arch = "x86_64")))]
321321
pub fn file_name(&self) -> &ffi::CStr {
322322
unsafe { ffi::CStr::from_ptr(self.0.d_name.as_ptr()) }
323323
}

0 commit comments

Comments
 (0)