From f8323171e71a922d22b4fca1c9ea17928237ac74 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Thu, 30 Apr 2026 21:29:41 +0200 Subject: [PATCH] fix: remove match if let guards for Rust 1.93 --- src/mime_app.rs | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/mime_app.rs b/src/mime_app.rs index 74c5f34..8695d79 100644 --- a/src/mime_app.rs +++ b/src/mime_app.rs @@ -60,21 +60,24 @@ pub fn exec_to_command( } // %f and %u behave the same in a file manager. - Some('f' | 'u') + Some('f' | 'u') => { if let Some(path) = path - && !field_code_used => - { - // TODO: files on remote file systems should be copied to a temporary local file. - batch_process = true; - field_code_used = true; - new_argument.push_str(path.as_bytes()); + && !field_code_used + { + // TODO: files on remote file systems should be copied to a temporary local file. + batch_process = true; + field_code_used = true; + new_argument.push_str(path.as_bytes()); + } } // %F and %U behave the same in a file manager. - Some('F') | Some('U') if !field_code_used && new_argument.is_empty() => { - field_code_used = true; - for path in path_opt.iter().map(AsRef::as_ref) { - args.push(BString::new(path.as_bytes().to_owned())); + Some('F') | Some('U') => { + if !field_code_used && new_argument.is_empty() { + field_code_used = true; + for path in path_opt.iter().map(AsRef::as_ref) { + args.push(BString::new(path.as_bytes().to_owned())); + } } }