aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar alecdwm 2019-12-05 18:00:41 +1000
committerGravatar alecdwm 2019-12-05 18:00:41 +1000
commit386f27df5b962cd83a728b886145debcd398d512 (patch)
treea2463b5c8816228a87d07fb7459ff6d5abccbab9
parent0f341778d756d82f22a37cad261953f74712c318 (diff)
removed redundant try_into from intcode_computer
-rw-r--r--src/year_2019/intcode_computer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/year_2019/intcode_computer.rs b/src/year_2019/intcode_computer.rs
index 79fd711..74665e2 100644
--- a/src/year_2019/intcode_computer.rs
+++ b/src/year_2019/intcode_computer.rs
@@ -275,7 +275,7 @@ impl IntcodeParameter {
fn get_value(&self, memory: &IntcodeProgram) -> i64 {
match self {
- Self::Position(address) => *memory.get((*address).try_into().unwrap()),
+ Self::Position(address) => *memory.get(*address),
Self::Value(value) => *value,
}
}