mirror of
https://github.com/theoludwig/advent_of_code.git
synced 2025-05-18 19:27:51 +02:00
chore: update to Rust edition 2024
This commit is contained in:
parent
3927359492
commit
8c5d280aa3
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
|||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
rust-version: ["1.84.1", "stable"]
|
rust-version: ["1.87.0", "stable"]
|
||||||
steps:
|
steps:
|
||||||
- uses: "actions/checkout@v4.2.2"
|
- uses: "actions/checkout@v4.2.2"
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ resolver = "2"
|
|||||||
[workspace.package]
|
[workspace.package]
|
||||||
# name = "advent_of_code"
|
# name = "advent_of_code"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
edition = "2021"
|
edition = "2024"
|
||||||
rust-version = "1.84.1"
|
rust-version = "1.87.0"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
rayon = { version = "=1.10.0" }
|
rayon = { version = "=1.10.0" }
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
The project is **tested** against the following [Rust](https://www.rust-lang.org/) versions:
|
The project is **tested** against the following [Rust](https://www.rust-lang.org/) versions:
|
||||||
|
|
||||||
- **Minimum Supported Rust Version (MSRV): v1.84.1**
|
- **Minimum Supported Rust Version (MSRV): v1.87.0**
|
||||||
- **Latest Stable Version**
|
- **Latest Stable Version**
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
@ -39,7 +39,7 @@ impl RaceStrategy {
|
|||||||
pub fn part_1(input: &str) -> usize {
|
pub fn part_1(input: &str) -> usize {
|
||||||
fn get_numbers_from_line(line: &str) -> Vec<usize> {
|
fn get_numbers_from_line(line: &str) -> Vec<usize> {
|
||||||
line.split(':')
|
line.split(':')
|
||||||
.last()
|
.next_back()
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
.split_ascii_whitespace()
|
.split_ascii_whitespace()
|
||||||
.map(|value| value.trim())
|
.map(|value| value.trim())
|
||||||
@ -70,7 +70,7 @@ pub fn part_1(input: &str) -> usize {
|
|||||||
pub fn part_2(input: &str) -> usize {
|
pub fn part_2(input: &str) -> usize {
|
||||||
fn get_number_from_line(line: &str) -> usize {
|
fn get_number_from_line(line: &str) -> usize {
|
||||||
line.split(':')
|
line.split(':')
|
||||||
.last()
|
.next_back()
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
.replace(' ', "")
|
.replace(' ', "")
|
||||||
.trim()
|
.trim()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user