From 3fa126ffa58988860d22ccfd66ad5dac56e7d930 Mon Sep 17 00:00:00 2001 From: yggverse Date: Tue, 8 Jul 2025 19:09:36 +0300 Subject: [PATCH] use short local var name --- crates/udp/src/swarm.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/udp/src/swarm.rs b/crates/udp/src/swarm.rs index 4eb04ad..b255cbe 100644 --- a/crates/udp/src/swarm.rs +++ b/crates/udp/src/swarm.rs @@ -141,19 +141,19 @@ impl TorrentMaps { path: &std::path::PathBuf, info_hashes: &Vec, ) -> Result<()> { - let mut file = Context::with_context(std::fs::File::create(path), || { + let mut f = Context::with_context(std::fs::File::create(path), || { format!("File path: {}", path.to_string_lossy()) })?; - write!(file, "[")?; + write!(f, "[")?; if !info_hashes.is_empty() { - write!(file, "\"{}\"", info_hashes[0])?; + write!(f, "\"{}\"", info_hashes[0])?; if let Some(i) = info_hashes.get(1..) { for info_hash in i { - write!(file, ",\"{info_hash}\"")?; + write!(f, ",\"{info_hash}\"")?; } } } - write!(file, "]")?; + write!(f, "]")?; Ok(()) } if config.network.ipv4_active() {