diff --git a/src/day04/utilities.rs b/src/day04/utilities.rs index f2243ca..b5fda5a 100644 --- a/src/day04/utilities.rs +++ b/src/day04/utilities.rs @@ -14,10 +14,6 @@ impl Range { } } - pub fn calc_size(&self) -> u16 { - self.start.abs_diff(self.end) - } - pub fn any_overlap(&self, other: &Self) -> bool { self.start <= other.end && self.end >= other.start } @@ -31,14 +27,6 @@ impl Range { pub fn complete_overlap(&self, other: &Self) -> bool { self.calc_overlap(other) == *self || self.calc_overlap(other) == *other } - - pub fn start(&self) -> u16 { - self.start - } - - pub fn end(&self) -> u16 { - self.end - } } static PARSE_REGEX: Lazy = Lazy::new(|| Regex::new(r"^(\d+)-(\d+),(\d+)-(\d+)").unwrap()); diff --git a/src/day07/fileTree.rs b/src/day07/file_tree.rs similarity index 95% rename from src/day07/fileTree.rs rename to src/day07/file_tree.rs index 57c81e9..ce4854b 100644 --- a/src/day07/fileTree.rs +++ b/src/day07/file_tree.rs @@ -1,3 +1,4 @@ +#![allow(unused)] use std::{rc::{Weak, Rc}, cell::RefCell}; #[derive(Debug)] diff --git a/src/day07/parser.rs b/src/day07/parser.rs index 54c7d96..ff597d9 100644 --- a/src/day07/parser.rs +++ b/src/day07/parser.rs @@ -1,4 +1,5 @@ -use crate::fileTree::*; +#![allow(unused)] +use crate::file_tree::*; use once_cell::sync::Lazy; use regex::Regex; diff --git a/src/day07/part1.rs b/src/day07/part1.rs index 147423b..1f5e47a 100644 --- a/src/day07/part1.rs +++ b/src/day07/part1.rs @@ -1,4 +1,5 @@ -use crate::fileTree::*; +#![allow(unused)] +use crate::file_tree::*; use crate::parser::*; pub fn part1() -> usize { diff --git a/src/day07/part2.rs b/src/day07/part2.rs index 82d67bd..c4f18d4 100644 --- a/src/day07/part2.rs +++ b/src/day07/part2.rs @@ -1,4 +1,5 @@ -use crate::fileTree::*; +#![allow(unused)] +use crate::file_tree::*; use crate::parser::*; pub fn part2() -> usize { diff --git a/src/day07/solve.rs b/src/day07/solve.rs index d090dcf..bc1accb 100644 --- a/src/day07/solve.rs +++ b/src/day07/solve.rs @@ -1,11 +1,12 @@ +#![allow(unused)] mod part1; mod part2; mod parser; -mod fileTree; +mod file_tree; fn main() { - let _input = include_str!("./input.txt"); - let _structured_input = parser::parse(_input); + let input = include_str!("./input.txt"); + let structured_input = parser::parse(input); println!("Part One"); println!("Result: {}", part1::part1()); diff --git a/src/template/part1.rs b/src/template/part1.rs index 4074daf..7db65d8 100644 --- a/src/template/part1.rs +++ b/src/template/part1.rs @@ -1,3 +1,4 @@ +#![allow(unused)] use crate::utilities::*; pub fn part1() -> usize { diff --git a/src/template/part2.rs b/src/template/part2.rs index 246b113..b775657 100644 --- a/src/template/part2.rs +++ b/src/template/part2.rs @@ -1,3 +1,4 @@ +#![allow(unused)] use crate::utilities::*; pub fn part2() -> usize { diff --git a/src/template/solve.rs b/src/template/solve.rs index c613d23..6b8c460 100644 --- a/src/template/solve.rs +++ b/src/template/solve.rs @@ -1,10 +1,11 @@ +#![allow(unused)] mod part1; mod part2; mod utilities; fn main() { - let _input = include_str!("./input.txt"); - let _structured_input = utilities::parse(_input); + let input = include_str!("./input.txt"); + let structured_input = utilities::parse(input); println!("Part One"); println!("Result: {}", part1::part1()); diff --git a/src/template/utilities.rs b/src/template/utilities.rs index be3e53c..5fd0406 100644 --- a/src/template/utilities.rs +++ b/src/template/utilities.rs @@ -1,3 +1,4 @@ +#![allow(unused)] pub fn parse(input: &str) -> usize { unimplemented!() }