Skip to content

Commit c013fbf

Browse files
shskwmtsylvestre
authored andcommitted
rm: Remove unused import and improve code readability
- Eliminated unnecessary `PathBuf` import in `features/fsext.rs`. - Replaced `unwrap_or(PathBuf::new())` with the more idiomatic `unwrap_or_default()`.
1 parent 83c3888 commit c013fbf

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/uucore/src/lib/features/fsext.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ static EXIT_ERR: i32 = 1;
2828
#[cfg(windows)]
2929
use crate::show_warning;
3030

31-
#[cfg(windows)]
32-
use std::path::PathBuf;
33-
3431
#[cfg(windows)]
3532
use std::ffi::OsStr;
3633
#[cfg(windows)]
@@ -265,7 +262,7 @@ impl MountInfo {
265262

266263
let mount_dir = Path::new(&mount_root)
267264
.canonicalize()
268-
.unwrap_or(PathBuf::new())
265+
.unwrap_or_default()
269266
.to_str()
270267
.unwrap()
271268
.to_string();

0 commit comments

Comments
 (0)