diff options
| author | Dave Huseby <dhuseby@mozilla.com> | 2016-01-26 21:37:46 -0800 |
|---|---|---|
| committer | Dave Huseby <dhuseby@mozilla.com> | 2016-02-02 21:42:11 -0800 |
| commit | c83128eb6064887cbc675e6fcda06161ec573802 (patch) | |
| tree | 72700d9bfed0787607e898142c4fba770cb06481 /src/libstd | |
| parent | 0153e64d975ec175f893ad528311ef7c441a1561 (diff) | |
| download | rust-c83128eb6064887cbc675e6fcda06161ec573802.tar.gz rust-c83128eb6064887cbc675e6fcda06161ec573802.zip | |
unifying name_bytes now that the two blocks are the same
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/sys/unix/fs.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs index 9da986d7fbf..91931811234 100644 --- a/src/libstd/sys/unix/fs.rs +++ b/src/libstd/sys/unix/fs.rs @@ -211,14 +211,8 @@ impl DirEntry { #[cfg(any(target_os = "macos", target_os = "ios", target_os = "netbsd", - target_os = "openbsd"))] - fn name_bytes(&self) -> &[u8] { - unsafe { - ::slice::from_raw_parts(self.entry.d_name.as_ptr() as *const u8, - self.entry.d_namlen as usize) - } - } - #[cfg(any(target_os = "freebsd", + target_os = "openbsd", + target_os = "freebsd", target_os = "dragonfly", target_os = "bitrig"))] fn name_bytes(&self) -> &[u8] { |
