From 1a84376b98b98154e654891462a84d8d06e47bb2 Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 7 Jul 2025 14:27:29 +0300 Subject: [PATCH] wrap once --- src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index dd43551..03bef7b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -240,10 +240,10 @@ async fn main() -> Result<()> { /// Shared handler function to save resolved torrents as file fn save_torrent_file(t: &Torrent, d: &Debug, i: &str, b: &[u8]) { match t.persist(i, b) { - Ok(r) => match r { - Some(p) => d.info(&format!("Add torrent file `{}`", p.to_string_lossy())), - None => d.info(&format!("Torrent file `{i}` already exists")), - }, + Ok(r) => d.info(&match r { + Some(p) => format!("Add torrent file `{}`", p.to_string_lossy()), + None => format!("Torrent file `{i}` already exists"), + }), Err(e) => d.error(&format!("Error on save torrent file `{i}`: {e}")), } }