From 870d70001be9844ac5fcc486d265eaee4b9253e5 Mon Sep 17 00:00:00 2001 From: Tobias Berger Date: Mon, 5 Dec 2022 13:14:50 +0100 Subject: [PATCH] Rust Day 5 - Remove redundant clone --- rust/src/day05/part_1.rs | 2 +- rust/src/day05/part_2.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/src/day05/part_1.rs b/rust/src/day05/part_1.rs index d6cb27a..f129f88 100644 --- a/rust/src/day05/part_1.rs +++ b/rust/src/day05/part_1.rs @@ -1,5 +1,5 @@ pub(crate) fn part_1(input: crate::ChallengeInput) -> String { - let mut state = input.initial_state.clone(); + let mut state = input.initial_state; for crate::Instruction { origin, diff --git a/rust/src/day05/part_2.rs b/rust/src/day05/part_2.rs index 1b0ccec..24b1a71 100644 --- a/rust/src/day05/part_2.rs +++ b/rust/src/day05/part_2.rs @@ -1,5 +1,5 @@ pub(crate) fn part_2(input: crate::ChallengeInput) -> String { - let mut state = input.initial_state.clone(); + let mut state = input.initial_state; for crate::Instruction { origin,