Skip to content

Commit

Permalink
Clippy: remove an unused lifetime parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
asomers committed Aug 29, 2019
1 parent 4a8edd6 commit 1c267ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fcntl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ fn wrap_readlink_result(v: &mut Vec<u8>, res: ssize_t) -> Result<OsString> {
}
}

pub fn readlink<'a, P: ?Sized + NixPath>(path: &P) -> Result<OsString> {
pub fn readlink<P: ?Sized + NixPath>(path: &P) -> Result<OsString> {
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) }
Expand All @@ -199,7 +199,7 @@ pub fn readlink<'a, P: ?Sized + NixPath>(path: &P) -> Result<OsString> {
}


pub fn readlinkat<'a, P: ?Sized + NixPath>(dirfd: RawFd, path: &P) -> Result<OsString> {
pub fn readlinkat<P: ?Sized + NixPath>(dirfd: RawFd, path: &P) -> Result<OsString> {
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) }
Expand Down

0 comments on commit 1c267ca

Please sign in to comment.