summaryrefslogtreecommitdiff
path: root/src/bin/day_1.rs
diff options
context:
space:
mode:
authorJustin Wernick <justin@worthe-it.co.za>2021-12-02 09:19:49 +0200
committerJustin Wernick <justin@worthe-it.co.za>2021-12-02 09:19:49 +0200
commite023b2ad45e8eb624b15a9301a3a96fbb9442e92 (patch)
tree7d13c3f75d008cfe09e943b778712021b1948a7a /src/bin/day_1.rs
parente132e55fee2822f6eeb1e47a69491e69b22bb41f (diff)
Day 2
Diffstat (limited to 'src/bin/day_1.rs')
-rw-r--r--src/bin/day_1.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/bin/day_1.rs b/src/bin/day_1.rs
index ca2e242..62ab045 100644
--- a/src/bin/day_1.rs
+++ b/src/bin/day_1.rs
@@ -1,5 +1,9 @@
-use aoc2021::parsers;
-use nom::{character::complete::line_ending, combinator::map, multi::separated_list1, IResult};
+use nom::{
+ character::complete::{line_ending, u64 as nom_u64},
+ combinator::map,
+ multi::separated_list1,
+ IResult,
+};
use std::fs;
fn main() -> Result<(), Box<dyn std::error::Error>> {
@@ -39,7 +43,7 @@ fn parse_sonar_scan(input: &str) -> IResult<&str, Vec<Depth>> {
}
fn parse_depth(input: &str) -> IResult<&str, Depth> {
- map(parsers::u64, Depth)(input)
+ map(nom_u64, Depth)(input)
}
#[derive(Default, Debug)]