From d7af3b254308b3bc86100bf43172919de91da3a8 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sat, 29 Jul 2023 23:18:21 +0200 Subject: [PATCH] =?UTF-8?q?chore(rs):=20refactor=20the=20=E2=80=B9main?= =?UTF-8?q?=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, 2 insertions(+), 6 deletions(-) diff --git a/.common/rust/src/main.rs b/.common/rust/src/main.rs index 2b2cb86..48c7902 100644 --- a/.common/rust/src/main.rs +++ b/.common/rust/src/main.rs @@ -27,13 +27,9 @@ const SINGLE_TEST: bool = false; fn main() { let mut s = Scanner::new(); - if SINGLE_TEST { + let n: usize = if SINGLE_TEST { 1 } else { s.next() }; + for _ in 0..n { solve(&mut s) - } else { - let n = s.next::(); - for _ in 0..n { - solve(&mut s) - } } } // endregion runner