rmdir: use is_empty()

This commit is contained in:
John Shin
2023-07-28 17:10:36 -07:00
parent 0d56792c58
commit 426cce7df0
+1 -1
View File
@@ -100,7 +100,7 @@ fn remove(mut path: &Path, opts: Opts) -> Result<(), Error<'_>> {
if opts.parents {
while let Some(new) = path.parent() {
path = new;
if path.as_os_str() == "" {
if path.as_os_str().is_empty() {
break;
}
remove_single(path, opts)?;