summaryrefslogtreecommitdiff
path: root/template/main.rs
diff options
context:
space:
mode:
authormhsn <mail@mhsn.net>2025-09-03 18:48:52 +0000
committermhsn <mail@mhsn.net>2025-09-03 18:48:52 +0000
commit61d5ed8bf546c18a24d7be09d45233b2f66d5dd3 (patch)
tree6c222233ca1be511ffb3e6c74d33533ba42c5667 /template/main.rs
parentc01e5271e0af033f0d8275d6c3f83a5e884cfccc (diff)
downloadaoc-61d5ed8bf546c18a24d7be09d45233b2f66d5dd3.tar.gz
aoc-61d5ed8bf546c18a24d7be09d45233b2f66d5dd3.zip
improve rust template
Diffstat (limited to 'template/main.rs')
-rw-r--r--template/main.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/template/main.rs b/template/main.rs
index 88bdc79..397d51f 100644
--- a/template/main.rs
+++ b/template/main.rs
@@ -1,14 +1,16 @@
use std::io;
-fn main() -> io::Result<()> {
- for line in io::stdin().lines() {
- let _line = line?;
- }
+fn main() {
+ let lines = io::stdin()
+ .lines()
+ .flatten()
+ .map(|line| line)
+ .collect::<Vec<_>>();
+
+ dbg!(lines);
let silver: u64 = 0;
let gold: u64 = 0;
println!("silver: {silver}");
println!("gold: {gold}");
-
- return Ok(());
}