From f370beb19f7fa93c2140305c9f8e4334c539fe7b Mon Sep 17 00:00:00 2001 From: ddidderr Date: Fri, 12 Jun 2026 22:54:29 +0200 Subject: [PATCH] cleanup: move output_options into decrypt arms instead of cloning The two decrypt match arms (range decrypt and full decrypt) are mutually exclusive, so each can take ownership of output_options; the clone() calls falsely suggested the value is used again later. The encrypt path already moved it. No behavior change beyond dropping one Option clone per decrypt invocation. --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5f9a2d5..104b8e1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -259,7 +259,7 @@ fn run(mut cli: Cli) -> Result<(), FcryError> { offset: o, length: l, max_argon_memory_mib: argon_cap.effective_mib, - output: output_options.clone(), + output: output_options, }; decrypt_range(&options, raw_key.as_ref(), pw.as_ref())?; } @@ -269,7 +269,7 @@ fn run(mut cli: Cli) -> Result<(), FcryError> { output_file: output.as_deref().map(PathBuf::from), threads, max_argon_memory_mib: argon_cap.effective_mib, - output: output_options.clone(), + output: output_options, }; decrypt(&options, raw_key.as_ref(), pw.as_ref())?; }