From b9135e34a24762a86a5ad790f8280233966adfd3 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sat, 29 Jul 2023 19:48:45 +0200 Subject: [PATCH] =?UTF-8?q?chore(rs):=20refactor=20reading=20=E2=80=B9Vec=E2=80=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matej Focko --- .common/rust/src/main.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.common/rust/src/main.rs b/.common/rust/src/main.rs index 3a21fdf..062eb44 100644 --- a/.common/rust/src/main.rs +++ b/.common/rust/src/main.rs @@ -288,13 +288,7 @@ mod input { } pub fn next_vec(&mut self, n: usize) -> Vec { - let mut arr = vec![]; - - for _ in 0..n { - arr.push(self.next::()); - } - - arr + (0..n).map(|_| self.next()).collect() } } }