1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

chown: Add crate walkdir

This commit is contained in:
Knight 2016-06-27 23:22:13 +08:00
parent 04d7f81fd3
commit d4b2766c4b
2 changed files with 3 additions and 1 deletions

View file

@ -12,7 +12,7 @@ getopts = "*"
glob = "*" glob = "*"
libc = "*" libc = "*"
uucore = { path="../uucore" } uucore = { path="../uucore" }
clippy = {version = "*", optional = true} walkdir = "0.1"
[[bin]] [[bin]]
name = "chown" name = "chown"

View file

@ -18,6 +18,7 @@ macro_rules! gen_func {
if !data.is_null() { if !data.is_null() {
return Ok(id); return Ok(id);
} else { } else {
// last_os_error() returns success
return Err(Error::new(ErrorKind::NotFound, format!("No such id `{}`", id))); return Err(Error::new(ErrorKind::NotFound, format!("No such id `{}`", id)));
} }
} else { } else {
@ -30,6 +31,7 @@ macro_rules! gen_func {
ptr::read(data).$field ptr::read(data).$field
}); });
} else { } else {
// last_os_error() returns success
return Err(Error::new(ErrorKind::NotFound, format!("No such name `{}`", name_or_id))); return Err(Error::new(ErrorKind::NotFound, format!("No such name `{}`", name_or_id)));
} }
} }