mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-25 12:50:32 +01:00
Replace unnecessary Vec with slice
This commit is contained in:
@@ -48,7 +48,7 @@ fn parse_fold(input: &[u8]) -> IResult<&[u8], Fold> {
|
|||||||
)(input)
|
)(input)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn apply_fold(dots: &mut Vec<Coords>, fold: Fold) {
|
fn apply_fold(dots: &mut [Coords], fold: Fold) {
|
||||||
match fold {
|
match fold {
|
||||||
Fold::X(coord) => dots.iter_mut().for_each(|(x, _)| {
|
Fold::X(coord) => dots.iter_mut().for_each(|(x, _)| {
|
||||||
if *x >= coord {
|
if *x >= coord {
|
||||||
|
|||||||
Reference in New Issue
Block a user