src: Format let-else statements

This commit is contained in:
Sophie Herold 2023-07-06 23:48:56 +02:00
parent 6297dcf54b
commit 06d688e79e
6 changed files with 48 additions and 16 deletions

View file

@ -550,8 +550,13 @@ impl LpWindow {
async fn trash(&self) {
let image_view = self.image_view();
let (Some(file), Some(path)) = (image_view.current_file(), image_view.current_file().and_then(|x| x.path()))
else { log::error!("No file to trash"); return; };
let (Some(file), Some(path)) = (
image_view.current_file(),
image_view.current_file().and_then(|x| x.path()),
) else {
log::error!("No file to trash");
return;
};
let result = file.trash_future(glib::Priority::default()).await;