chore(clippy): mime_app, operation, mounter

Fixes Clippy lints for:
* src/mounter/
* src/operation/
* src/mime_app.rs
* src/mouse_area.rs (I missed two of them last time)
This commit is contained in:
Josh Megnauth 2025-01-20 01:48:41 -05:00 committed by Jeremy Soller
parent 6a6a494012
commit 8ff54d1522
4 changed files with 9 additions and 21 deletions

View file

@ -97,7 +97,7 @@ fn network_scan(uri: &str, sizes: IconSizes) -> Result<Vec<tab::Item>, String> {
info.icon()
.as_ref()
.and_then(|icon| gio_icon_to_path(icon, size))
.map(|path| widget::icon::from_path(path))
.map(widget::icon::from_path)
.unwrap_or(
widget::icon::from_name(if metadata.is_dir() {
"folder"
@ -388,10 +388,7 @@ impl Gvfs {
let file = gio::File::for_uri(&uri);
let needs_mount = match file.find_enclosing_mount(gio::Cancellable::NONE) {
Ok(_) => false,
Err(err) => match err.kind::<gio::IOErrorEnum>() {
Some(gio::IOErrorEnum::NotMounted) => true,
_ => false
}
Err(err) => matches!(err.kind::<gio::IOErrorEnum>(), Some(gio::IOErrorEnum::NotMounted))
};
if needs_mount {
let mount_op = mount_op(uri.clone(), event_tx.clone());
@ -468,7 +465,6 @@ impl Mounter for Gvfs {
Task::perform(
async move {
command_tx.send(Cmd::Mount(item)).unwrap();
()
},
|x| x,
)
@ -479,7 +475,6 @@ impl Mounter for Gvfs {
Task::perform(
async move {
command_tx.send(Cmd::NetworkDrive(uri)).unwrap();
()
},
|x| x,
)
@ -498,7 +493,6 @@ impl Mounter for Gvfs {
Task::perform(
async move {
command_tx.send(Cmd::Unmount(item)).unwrap();
()
},
|x| x,
)