rust(day19): smol improvement

This commit is contained in:
Sijmen 2020-12-22 14:29:04 +01:00
parent 788651476c
commit d6888248c3
Signed by: vijfhoek
GPG key ID: DAF7821E067D9C48

View file

@ -782,11 +782,7 @@ mod day19 {
writeln!(&mut w, "if __name__ == '__main__':")?; writeln!(&mut w, "if __name__ == '__main__':")?;
writeln!(&mut w, " result = 0")?; writeln!(&mut w, " result = 0")?;
for message in messages { for message in messages {
writeln!(&mut w, " success = validate('{}')", message)?; writeln!(&mut w, " result += validate('{}')", message)?;
// writeln!(&mut w, " print('{}:', success)", message)?;
writeln!(&mut w, " if success:")?;
writeln!(&mut w, " result += 1")?;
writeln!(&mut w)?;
} }
writeln!(&mut w, " print('Result:', result)")?; writeln!(&mut w, " print('Result:', result)")?;