Skip to content

Commit d0b923f

Browse files
authored
fix: rename package to advent_of_code (#13)
`aoc` shadowed the `aoc-cli` binary which could lead to issues. closes #12
1 parent 9bc635a commit d0b923f

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

.vscode/launch.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
{
88
"type": "lldb",
99
"request": "launch",
10-
"name": "Debug unit tests in executable 'aoc'",
10+
"name": "Debug unit tests in executable 'advent_of_code'",
1111
"cargo": {
12-
"args": ["test", "--no-run", "--bin=aoc", "--package=aoc"],
12+
"args": ["test", "--no-run", "--bin=advent_of_code", "--package=advent_of_code"],
1313
"filter": {
14-
"name": "aoc",
14+
"name": "advent_of_code",
1515
"kind": "bin"
1616
}
1717
},
@@ -21,11 +21,11 @@
2121
{
2222
"type": "lldb",
2323
"request": "launch",
24-
"name": "Debug executable 'aoc'",
24+
"name": "Debug executable 'advent_of_code'",
2525
"cargo": {
26-
"args": ["build", "--bin=aoc", "--package=aoc"],
26+
"args": ["build", "--bin=advent_of_code", "--package=advent_of_code"],
2727
"filter": {
28-
"name": "aoc",
28+
"name": "advent_of_code",
2929
"kind": "bin"
3030
}
3131
},
@@ -35,11 +35,11 @@
3535
{
3636
"type": "lldb",
3737
"request": "launch",
38-
"name": "Debug unit tests in library 'aoc'",
38+
"name": "Debug unit tests in library 'advent_of_code'",
3939
"cargo": {
40-
"args": ["test", "--no-run", "--lib", "--package=aoc"],
40+
"args": ["test", "--no-run", "--lib", "--package=advent_of_code"],
4141
"filter": {
42-
"name": "aoc",
42+
"name": "advent_of_code",
4343
"kind": "lib"
4444
}
4545
},

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
2-
name = "aoc"
2+
name = "advent_of_code"
33
version = "0.7.0"
44
authors = ["Felix Spöttel <1682504+fspoettel@users.noreply.github.com>"]
55
edition = "2021"
6-
default-run = "aoc"
6+
default-run = "advent_of_code"
77
publish = false
88
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
99

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Displayed _timings_ show the raw execution time of your solution without overhea
100100
cargo all
101101

102102
# output:
103-
# Running `target/release/aoc`
103+
# Running `target/release/advent_of_code`
104104
# ----------
105105
# | Day 01 |
106106
# ----------

src/bin/scaffold.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ pub fn part_two(input: &str) -> Option<u32> {
1717
}
1818
1919
fn main() {
20-
let input = &aoc::read_file("inputs", DAY);
21-
aoc::solve!(1, part_one, input);
22-
aoc::solve!(2, part_two, input);
20+
let input = &advent_of_code::read_file("inputs", DAY);
21+
advent_of_code::solve!(1, part_one, input);
22+
advent_of_code::solve!(2, part_two, input);
2323
}
2424
2525
#[cfg(test)]
@@ -28,13 +28,13 @@ mod tests {
2828
2929
#[test]
3030
fn test_part_one() {
31-
let input = aoc::read_file("examples", DAY);
31+
let input = advent_of_code::read_file("examples", DAY);
3232
assert_eq!(part_one(&input), None);
3333
}
3434
3535
#[test]
3636
fn test_part_two() {
37-
let input = aoc::read_file("examples", DAY);
37+
let input = advent_of_code::read_file("examples", DAY);
3838
assert_eq!(part_two(&input), None);
3939
}
4040
}

src/helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/*
22
* Use this file if you want to extract helpers from your solutions.
3-
* Example import from this file: `use aoc::helpers::example_fn;`.
3+
* Example import from this file: `use advent_of_code::helpers::example_fn;`.
44
*/

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub const ANSI_RESET: &str = "\x1b[0m";
1515
#[macro_export]
1616
macro_rules! solve {
1717
($part:expr, $solver:ident, $input:expr) => {{
18-
use aoc::{ANSI_BOLD, ANSI_ITALIC, ANSI_RESET};
18+
use advent_of_code::{ANSI_BOLD, ANSI_ITALIC, ANSI_RESET};
1919
use std::fmt::Display;
2020
use std::time::Instant;
2121

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* This file contains template code.
33
* There is no need to edit this file unless you want to change template functionality.
44
*/
5-
use aoc::{ANSI_BOLD, ANSI_ITALIC, ANSI_RESET};
5+
use advent_of_code::{ANSI_BOLD, ANSI_ITALIC, ANSI_RESET};
66
use std::process::Command;
77

88
fn main() {
@@ -34,7 +34,7 @@ fn main() {
3434
if is_empty {
3535
0_f64
3636
} else {
37-
aoc::parse_exec_time(&output)
37+
advent_of_code::parse_exec_time(&output)
3838
}
3939
})
4040
.sum();

0 commit comments

Comments
 (0)