Optimize away an owned string in path_readlink.

This commit is contained in:
Dan Gohman
2019-09-29 11:52:09 -07:00
committed by Jakub Konka
parent 14bad3cb97
commit 4120d3b44f
2 changed files with 1 additions and 9 deletions

View File

@@ -652,7 +652,7 @@ pub(crate) unsafe fn path_readlink(
enc_usize_byref(memory, buf_used, 0)?;
let dirfd = dec_fd(dirfd);
let path = dec_slice_of::<u8>(memory, path_ptr, path_len).and_then(host::path_from_vec)?;
let path = dec_slice_of::<u8>(memory, path_ptr, path_len).and_then(host::path_from_slice)?;
trace!(" | (path_ptr,path_len)='{}'", &path);