From d6888248c393d54e9af881377d337cf7a2cfe700 Mon Sep 17 00:00:00 2001 From: Sijmen Schoon Date: Tue, 22 Dec 2020 14:29:04 +0100 Subject: [PATCH] rust(day19): smol improvement --- rust/src/main.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/rust/src/main.rs b/rust/src/main.rs index ff28d6c..2d6e978 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -782,11 +782,7 @@ mod day19 { writeln!(&mut w, "if __name__ == '__main__':")?; writeln!(&mut w, " result = 0")?; for message in messages { - writeln!(&mut w, " success = validate('{}')", message)?; - // writeln!(&mut w, " print('{}:', success)", message)?; - writeln!(&mut w, " if success:")?; - writeln!(&mut w, " result += 1")?; - writeln!(&mut w)?; + writeln!(&mut w, " result += validate('{}')", message)?; } writeln!(&mut w, " print('Result:', result)")?;