Skip to content

Commit a8da147

Browse files
committed
bump to edition 2024
1 parent aa51bcb commit a8da147

File tree

10 files changed

+101
-81
lines changed

10 files changed

+101
-81
lines changed

.github/workflows/qa.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717
- run: cargo test --verbose
1818
- run: cargo fmt --check
1919
- run: cargo clippy -- -D warnings
20-
coverage:
21-
name: Code coverage
22-
runs-on: ubuntu-latest
23-
container:
24-
image: xd009642/tarpaulin
25-
options: --security-opt seccomp=unconfined
26-
steps:
27-
- name: Checkout repository
28-
uses: actions/checkout@v4
29-
- name: Generate code coverage
30-
run: |
31-
cargo tarpaulin --verbose --workspace
20+
# coverage:
21+
# name: Code coverage
22+
# runs-on: ubuntu-latest
23+
# container:
24+
# image: xd009642/tarpaulin
25+
# options: --security-opt seccomp=unconfined
26+
# steps:
27+
# - name: Checkout repository
28+
# uses: actions/checkout@v4
29+
# - name: Generate code coverage
30+
# run: |
31+
# cargo tarpaulin --verbose --workspace

Cargo.lock

Lines changed: 43 additions & 40 deletions
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
@@ -5,8 +5,8 @@
55
name = "advent-of-code-rust"
66
version = "0.1.0"
77
authors = ["Balint Toth"]
8-
edition = "2021"
9-
rust-version = "1.83"
8+
edition = "2024"
9+
rust-version = "1.85"
1010
description = "Advent of Code puzzle solutions in Rust by TBali"
1111
homepage = "https://adventofcode.com/"
1212
repository = "https://github.com/tbali0524/advent-of-code-rust/"

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Advent of Code solutions in Rust by TBali
22

3-
![rust v1.83](https://shields.io/badge/rust-1.83-blue?logo=rust)
3+
![rust v1.85](https://shields.io/badge/rust-1.85-blue?logo=rust)
44
![build](https://img.shields.io/github/actions/workflow/status/tbali0524/advent-of-code-rust/qa.yml)
55
![AoC stars](https://img.shields.io/badge/total%20AoC%20⭐-230-green)
66
![license](https://img.shields.io/github/license/tbali0524/advent-of-code-rust)
@@ -31,6 +31,7 @@ cargo clippy
3131
# -- doc
3232
cargo doc --no-deps --document-private-items --open
3333
# -- test
34+
cargo nextest run # needs cargo plugin: <https://nexte.st/>
3435
cargo test
3536
cargo test 2024
3637
cargo test 2024day01

src/aoc.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ pub const START_SEASON: usize = 2015;
99
pub const MAX_SEASONS: usize = 11; // empty YYYY season also included as a template
1010
pub const MAX_DAYS: usize = 25;
1111

12+
// very slow puzzles (taking >5s) are excluded by default. They can be run individually.
13+
pub const SKIP_SLOW: bool = true;
14+
pub const PUZZLES_TO_SKIP: [(usize, usize); 3] = [(2016, 5), (2023, 23), (2024, 7)];
15+
pub const DURATION_THRESHOLD_MILLIS: u64 = 1000; // puzzle duration printed in yellow if taking longer than this
16+
1217
pub use error::PuzzleError;
1318

1419
/// The expected solution for a test case, containing both parts of the puzzle.
@@ -44,9 +49,6 @@ pub struct PuzzleMetaData<'a> {
4449
pub example_solutions: Vec<PuzzleExpected<'a>>,
4550
}
4651

47-
// puzzles taking >5s are excluded by default. They can be run individually.
48-
pub const PUZZLES_TO_SKIP: [(usize, usize); 3] = [(2016, 5), (2023, 23), (2024, 7)];
49-
5052
/// Array of seasons containing the arrays of the implemented puzzles.
5153
pub const PUZZLES: [Option<Season>; MAX_SEASONS] = [
5254
Some(crate::aoc2015::PUZZLES),

src/aoc/ansi.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
//! ANSI color codes for terminal output.
22
3-
pub const ANSI_RED_INV: &str = "\x1b[1;37;41m";
43
pub const ANSI_RESET: &str = "\x1b[0m";
5-
6-
pub const ANSI_GREEN_INV: &str = "\x1b[1;37;42m";
74
pub const ANSI_GREEN: &str = "\x1b[32m";
5+
pub const ANSI_GREEN_INV: &str = "\x1b[1;37;42m";
6+
pub const ANSI_RED: &str = "\x1b[31m";
7+
pub const ANSI_RED_INV: &str = "\x1b[1;37;41m";
88
pub const ANSI_YELLOW: &str = "\x1b[33m";
9+
pub const ANSI_YELLOW_INV: &str = "\x1b[1;37;43m";

0 commit comments

Comments
 (0)