diff --git a/src/fcntl.rs b/src/fcntl.rs index 7ccb737670..2cb7f50575 100644 --- a/src/fcntl.rs +++ b/src/fcntl.rs @@ -189,7 +189,7 @@ fn wrap_readlink_result(v: &mut Vec, res: ssize_t) -> Result { } } -pub fn readlink<'a, P: ?Sized + NixPath>(path: &P) -> Result { +pub fn readlink(path: &P) -> Result { let mut v = Vec::with_capacity(libc::PATH_MAX as usize); let res = path.with_nix_path(|cstr| { unsafe { libc::readlink(cstr.as_ptr(), v.as_mut_ptr() as *mut c_char, v.capacity() as size_t) } @@ -199,7 +199,7 @@ pub fn readlink<'a, P: ?Sized + NixPath>(path: &P) -> Result { } -pub fn readlinkat<'a, P: ?Sized + NixPath>(dirfd: RawFd, path: &P) -> Result { +pub fn readlinkat(dirfd: RawFd, path: &P) -> Result { let mut v = Vec::with_capacity(libc::PATH_MAX as usize); let res = path.with_nix_path(|cstr| { unsafe { libc::readlinkat(dirfd, cstr.as_ptr(), v.as_mut_ptr() as *mut c_char, v.capacity() as size_t) }