From b17f7207359cb2059dd7277f9ec816921147c485 Mon Sep 17 00:00:00 2001 From: alyx Date: Mon, 20 Nov 2023 17:52:42 -0500 Subject: remove warnings --- 2015/rs/code/eight/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '2015/rs/code/eight') 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) -- cgit v1.2.3-70-g09d2