summaryrefslogtreecommitdiffstats
path: root/2015/rs/code/eight/src
diff options
context:
space:
mode:
authoralyx <alyx@aleteoryx.me>2023-11-20 17:52:42 -0500
committeralyx <alyx@aleteoryx.me>2023-11-20 17:52:42 -0500
commitb17f7207359cb2059dd7277f9ec816921147c485 (patch)
treebfb3e41ef432f6c0b685f17ac9742e4e3109cbe1 /2015/rs/code/eight/src
parentccf1a5828fc26a82545c7accf1ce7916daa08a2d (diff)
downloadadventofcode-b17f7207359cb2059dd7277f9ec816921147c485.tar.gz
adventofcode-b17f7207359cb2059dd7277f9ec816921147c485.tar.bz2
adventofcode-b17f7207359cb2059dd7277f9ec816921147c485.zip
remove warnings
Diffstat (limited to '2015/rs/code/eight/src')
-rw-r--r--2015/rs/code/eight/src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/2015/rs/code/eight/src/main.rs b/2015/rs/code/eight/src/main.rs
index b51f436..6917a54 100644
--- a/2015/rs/code/eight/src/main.rs
+++ b/2015/rs/code/eight/src/main.rs
@@ -5,7 +5,7 @@ enum ParseState {
Verbatim,
Esc,
Hex1,
- Hex2(u32)
+ Hex2
}
fn main() {
@@ -25,8 +25,8 @@ fn main() {
(ParseState::Esc, 'x') => { state = ParseState::Hex1; },
(ParseState::Esc, c) => { buf.push(c); state = ParseState::Verbatim; },
- (ParseState::Hex1, c) => { state = ParseState::Hex2(c.to_digit(16).unwrap() * 16); },
- (ParseState::Hex2(n), c) => { buf.push(/*char::from_u32(n + c.to_digit(16).unwrap()).unwrap()*/'?'); state = ParseState::Verbatim; },
+ (ParseState::Hex1, _) => { state = ParseState::Hex2; },
+ (ParseState::Hex2, _) => { buf.push('?'); state = ParseState::Verbatim; },
}
}
(s, buf)