Skip to content

Commit 8117f3e

Browse files
committed
Rust 2024 Edition
1 parent 47b39bf commit 8117f3e

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

.github/workflows/checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- uses: actions/checkout@v4
23-
- run: rustup default 1.84
23+
- run: rustup default 1.85
2424
- run: cargo test
2525

2626
test-nightly:

.github/workflows/docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
url: ${{ steps.deployment.outputs.page_url }}
1919
steps:
2020
- uses: actions/checkout@v4
21-
- run: rustup default 1.84
21+
- run: rustup default 1.85
2222
- run: cargo doc
2323
env:
2424
RUSTDOCFLAGS: "--document-private-items --default-theme=ayu --deny warnings"

Cargo.toml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "aoc"
33
version = "2024.12.25"
4-
edition = "2021"
5-
rust-version = "1.84"
4+
edition = "2024"
5+
rust-version = "1.85"
66

77
[features]
88
frivolity = []
@@ -14,9 +14,11 @@ private_intra_doc_links = "allow"
1414
[lints.rust]
1515
absolute_paths_not_starting_with_crate = "warn"
1616
ambiguous_negative_literals = "warn"
17+
closure-returning-async-block = "warn"
1718
elided_lifetimes_in_paths = "warn"
1819
explicit_outlives_requirements = "warn"
1920
ffi_unwind_calls = "warn"
21+
if-let-rescope = "warn"
2022
let_underscore_drop = "warn"
2123
macro_use_extern_crate = "warn"
2224
meta_variable_misuse = "warn"
@@ -26,7 +28,6 @@ missing_debug_implementations = "allow"
2628
missing_docs = "allow"
2729
missing_unsafe_on_extern = "warn"
2830
non_ascii_idents = "warn"
29-
non_local_definitions = "warn"
3031
redundant_imports = "warn"
3132
redundant_lifetimes = "warn"
3233
single_use_lifetimes = "warn"
@@ -83,6 +84,7 @@ default_trait_access = "warn"
8384
default_union_representation = "warn"
8485
deref_by_slicing = "allow"
8586
disallowed_script_idents = "warn"
87+
doc_include_without_cfg = "warn"
8688
doc_link_with_quotes = "warn"
8789
doc_markdown = "warn"
8890
else_if_without_else = "allow"

rustfmt.toml

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
style_edition = "2024"
21
use_small_heuristics = "Max"

src/year2019/day25.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ fn play_automatically(input: &[i64]) -> String {
134134
too_light.insert(current);
135135
continue;
136136
}
137-
};
137+
}
138138

139139
if matches!(movement_noisy(&mut computer, &last, &mut output), State::Halted) {
140140
// Keep only the password digits from Santa's response.

src/year2021/day19.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,9 @@ pub fn parse(input: &str) -> Vec<Located> {
191191
let mut next_unknown = Vec::new();
192192

193193
while let Some(scanner) = unknown.pop() {
194-
if let Some(found) = check(&known, &scanner) {
195-
todo.push(Located::from(scanner, found));
196-
} else {
197-
next_unknown.push(scanner);
194+
match check(&known, &scanner) {
195+
Some(found) => todo.push(Located::from(scanner, found)),
196+
None => next_unknown.push(scanner),
198197
}
199198
}
200199

src/year2022/day17.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl Iterator for State<'_> {
9696
// Check for a horizontal collision (this does not prevent downwards movement).
9797
if candidate & chunk == 0 {
9898
shape = candidate;
99-
};
99+
}
100100

101101
// The neat part of using bitwise AND to compare is that we can check all four
102102
// rows in a single operation, including both walls and the existing tower.

0 commit comments

Comments
 (0)