diff --git a/src/chown/Cargo.toml b/src/chown/Cargo.toml index 1da09f5f0..e34abc72f 100644 --- a/src/chown/Cargo.toml +++ b/src/chown/Cargo.toml @@ -12,7 +12,7 @@ getopts = "*" glob = "*" libc = "*" uucore = { path="../uucore" } -clippy = {version = "*", optional = true} +walkdir = "0.1" [[bin]] name = "chown" diff --git a/src/chown/passwd.rs b/src/chown/passwd.rs index 3b5e7f744..ff0707228 100644 --- a/src/chown/passwd.rs +++ b/src/chown/passwd.rs @@ -18,6 +18,7 @@ macro_rules! gen_func { if !data.is_null() { return Ok(id); } else { + // last_os_error() returns success return Err(Error::new(ErrorKind::NotFound, format!("No such id `{}`", id))); } } else { @@ -30,6 +31,7 @@ macro_rules! gen_func { ptr::read(data).$field }); } else { + // last_os_error() returns success return Err(Error::new(ErrorKind::NotFound, format!("No such name `{}`", name_or_id))); } }