From d9d5947c3b3116b3ca6b472ee99298418282ec2c Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Tue, 7 Jun 2022 08:32:59 +0200 Subject: [PATCH] Replace unnecessary Vec with slice --- 2021/src/day13.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2021/src/day13.rs b/2021/src/day13.rs index 04f0a8a..c27cc6c 100644 --- a/2021/src/day13.rs +++ b/2021/src/day13.rs @@ -48,7 +48,7 @@ fn parse_fold(input: &[u8]) -> IResult<&[u8], Fold> { )(input) } -fn apply_fold(dots: &mut Vec, fold: Fold) { +fn apply_fold(dots: &mut [Coords], fold: Fold) { match fold { Fold::X(coord) => dots.iter_mut().for_each(|(x, _)| { if *x >= coord {