From f42cc3672ed6e7af94aedf957e0ad60e7b658a9e Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Thu, 15 Dec 2022 01:01:51 +0100 Subject: [PATCH] Typo --- src/day14.rs | 6 +++--- src/days.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/day14.rs b/src/day14.rs index da19259..59f2859 100644 --- a/src/day14.rs +++ b/src/day14.rs @@ -50,7 +50,7 @@ pub fn parse(input: &str) -> (Rocks, usize) { (rocks, max_i + 2) } -pub fn poor_sand(mut rocks: Rocks, floor: usize) -> (i32, i32) { +pub fn pour_sand(mut rocks: Rocks, floor: usize) -> (i32, i32) { let mut n = 0; let mut first_n_touching_floor = 0; @@ -97,12 +97,12 @@ mod tests { #[test] fn part1() { let (rocks, floor) = parse(ROCKS); - assert_eq!(poor_sand(rocks, floor).0, 24); + assert_eq!(pour_sand(rocks, floor).0, 24); } #[test] fn part2() { let (rocks, floor) = parse(ROCKS); - assert_eq!(poor_sand(rocks, floor).1, 93); + assert_eq!(pour_sand(rocks, floor).1, 93); } } diff --git a/src/days.rs b/src/days.rs index 415dc72..704e5b2 100644 --- a/src/days.rs +++ b/src/days.rs @@ -145,7 +145,7 @@ pub fn day13() -> String { pub fn day14() -> String { let (rocks, floor) = day14::parse(&fs::read_to_string("data/day14.input").unwrap()); - let (first_grain_touching_floor, last_grain) = day14::poor_sand(rocks, floor); + let (first_grain_touching_floor, last_grain) = day14::pour_sand(rocks, floor); format!( "part1: {}, part2: {}", first_grain_touching_floor, last_grain -- 2.45.2