summaryrefslogtreecommitdiff
path: root/src/bin/day2.rs
diff options
context:
space:
mode:
authorMike Vink <ivi@vinkies.net>2023-12-16 15:42:39 +0100
committerMike Vink <ivi@vinkies.net>2023-12-16 15:42:39 +0100
commit4f3506ee6a58170566d6cb17ddffa212ad7a221b (patch)
tree4bea0e55e6872c9dc6af3f15bee06f8cde3c4057 /src/bin/day2.rs
parent6c741e79ebccc9ee6dd9595f24c09b41e2b234ba (diff)
day3 almost finishedHEADmaster
Diffstat (limited to 'src/bin/day2.rs')
-rw-r--r--src/bin/day2.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/day2.rs b/src/bin/day2.rs
index 8c5c54d..46abcc9 100644
--- a/src/bin/day2.rs
+++ b/src/bin/day2.rs
@@ -1,6 +1,6 @@
#![feature(test)]
-use std::str::FromStr;
use std::error::Error;
+use std::str::FromStr;
const COLORS: [&str; 3] = ["red", "green", "blue"];
const AMOUNT: [u32; 3] = [12, 13, 14];
@@ -12,7 +12,9 @@ struct HelloWorld {
impl FromStr for HelloWorld {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> Result<Self, Self::Err> {
- Ok(HelloWorld { msg: String::from(s), })
+ Ok(HelloWorld {
+ msg: String::from(s),
+ })
}
}