diff options
| author | Mike Vink <ivi@vinkies.net> | 2023-12-16 15:42:39 +0100 |
|---|---|---|
| committer | Mike Vink <ivi@vinkies.net> | 2023-12-16 15:42:39 +0100 |
| commit | 4f3506ee6a58170566d6cb17ddffa212ad7a221b (patch) | |
| tree | 4bea0e55e6872c9dc6af3f15bee06f8cde3c4057 /src/bin/day2.rs | |
| parent | 6c741e79ebccc9ee6dd9595f24c09b41e2b234ba (diff) | |
Diffstat (limited to 'src/bin/day2.rs')
| -rw-r--r-- | src/bin/day2.rs | 6 |
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), + }) } } |
