summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-12-23 09:19:04 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-12-23 09:19:04 +0000
commitf722aa7d711e56a03c4c1fd7478d4c9bc74e2970 (patch)
tree293c3d9849ef62f537bf15f00f6f362a5a5c2c3d
parent1e872003f2a0c67ee98f23d2f09cff5058514b3a (diff)
downloadaoc-f722aa7d711e56a03c4c1fd7478d4c9bc74e2970.tar.bz2
2020: Get rid of lints in day 18
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-rw-r--r--2020/src/bin/2020day18.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/2020/src/bin/2020day18.rs b/2020/src/bin/2020day18.rs
index 17acca5..359e224 100644
--- a/2020/src/bin/2020day18.rs
+++ b/2020/src/bin/2020day18.rs
@@ -35,12 +35,12 @@ fn parse_expr(s: &str) -> Result<Vec<Part>> {
Ok(ret)
}
-fn expr_to_postfix(mut input: impl Iterator<Item = Part>) -> Vec<Part> {
+fn expr_to_postfix(input: impl Iterator<Item = Part>) -> Vec<Part> {
let mut ret = Vec::new();
let mut opstack = Vec::new();
for part in input {
match part {
- Number(n) => {
+ Number(_) => {
//println!("Emit1: {}", n);
ret.push(part);
}
@@ -89,7 +89,6 @@ fn expr_to_postfix(mut input: impl Iterator<Item = Part>) -> Vec<Part> {
}
}
}
- _ => unreachable!(),
}
}
while let Some(op) = opstack.pop() {