Skip to content

Commit 81b9b3c

Browse files
committed
Update name_bytes, scoop up latest libc
Update the implementation of name_bytes to use the owned string (which is thread safe). Also bump the src/liblibc submodule now that's merged.
1 parent 163698c commit 81b9b3c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/libstd/sys/unix/fs.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -345,14 +345,14 @@ impl DirEntry {
345345
#[cfg(any(target_os = "android",
346346
target_os = "linux",
347347
target_os = "emscripten",
348-
target_os = "haiku",
349-
target_os = "fuchsia"))]
348+
target_os = "haiku"))]
350349
fn name_bytes(&self) -> &[u8] {
351350
unsafe {
352351
CStr::from_ptr(self.entry.d_name.as_ptr()).to_bytes()
353352
}
354353
}
355-
#[cfg(target_os = "solaris")]
354+
#[cfg(any(target_os = "solaris",
355+
target_os = "fuchsia"))]
356356
fn name_bytes(&self) -> &[u8] {
357357
&*self.name
358358
}

0 commit comments

Comments
 (0)