fix: rename package to advent_of_code (#13)
`aoc` shadowed the `aoc-cli` binary which could lead to issues. closes #12
This commit is contained in:
@@ -17,9 +17,9 @@ pub fn part_two(input: &str) -> Option<u32> {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let input = &aoc::read_file("inputs", DAY);
|
||||
aoc::solve!(1, part_one, input);
|
||||
aoc::solve!(2, part_two, input);
|
||||
let input = &advent_of_code::read_file("inputs", DAY);
|
||||
advent_of_code::solve!(1, part_one, input);
|
||||
advent_of_code::solve!(2, part_two, input);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
@@ -28,13 +28,13 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_part_one() {
|
||||
let input = aoc::read_file("examples", DAY);
|
||||
let input = advent_of_code::read_file("examples", DAY);
|
||||
assert_eq!(part_one(&input), None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_part_two() {
|
||||
let input = aoc::read_file("examples", DAY);
|
||||
let input = advent_of_code::read_file("examples", DAY);
|
||||
assert_eq!(part_two(&input), None);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
* Use this file if you want to extract helpers from your solutions.
|
||||
* Example import from this file: `use aoc::helpers::example_fn;`.
|
||||
* Example import from this file: `use advent_of_code::helpers::example_fn;`.
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@ pub const ANSI_RESET: &str = "\x1b[0m";
|
||||
#[macro_export]
|
||||
macro_rules! solve {
|
||||
($part:expr, $solver:ident, $input:expr) => {{
|
||||
use aoc::{ANSI_BOLD, ANSI_ITALIC, ANSI_RESET};
|
||||
use advent_of_code::{ANSI_BOLD, ANSI_ITALIC, ANSI_RESET};
|
||||
use std::fmt::Display;
|
||||
use std::time::Instant;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file contains template code.
|
||||
* There is no need to edit this file unless you want to change template functionality.
|
||||
*/
|
||||
use aoc::{ANSI_BOLD, ANSI_ITALIC, ANSI_RESET};
|
||||
use advent_of_code::{ANSI_BOLD, ANSI_ITALIC, ANSI_RESET};
|
||||
use std::process::Command;
|
||||
|
||||
fn main() {
|
||||
@@ -34,7 +34,7 @@ fn main() {
|
||||
if is_empty {
|
||||
0_f64
|
||||
} else {
|
||||
aoc::parse_exec_time(&output)
|
||||
advent_of_code::parse_exec_time(&output)
|
||||
}
|
||||
})
|
||||
.sum();
|
||||
|
||||
Reference in New Issue
Block a user