From 7a62417d189239ad1fafa057dbef4927fe2b8299 Mon Sep 17 00:00:00 2001 From: yggverse Date: Tue, 8 Jul 2025 01:54:47 +0300 Subject: [PATCH] fix vector init --- crates/udp/src/swarm.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/udp/src/swarm.rs b/crates/udp/src/swarm.rs index d78a7b2..72b5cdf 100644 --- a/crates/udp/src/swarm.rs +++ b/crates/udp/src/swarm.rs @@ -183,7 +183,7 @@ impl TorrentMaps { let mut t = 0; let mut f = File::open(path)?; loop { - let mut b = vec![0, 20]; + let mut b = vec![0; 20]; let n = f.read_to_end(&mut b)?; if n == 0 { break;