fix clippy warning

This commit is contained in:
vms 2020-04-29 23:46:34 +03:00
parent abed2c238a
commit c4fd02aec7

View File

@ -1979,9 +1979,9 @@ pub fn path_remove_directory(
let host_path_to_remove = match &state.fs.inodes[inode].kind {
Kind::Dir { entries, path, .. } => {
if !entries.is_empty() {
return __WASI_ENOTEMPTY;
} else if wasi_try!(std::fs::read_dir(path).ok(), __WASI_EIO).count() != 0 {
if !entries.is_empty()
|| wasi_try!(std::fs::read_dir(path).ok(), __WASI_EIO).count() != 0
{
return __WASI_ENOTEMPTY;
}
path.clone()