Skip to content

Commit ebcd63f

Browse files
committed
2024-01 Rust
1 parent 0791a05 commit ebcd63f

File tree

12 files changed

+1158
-24
lines changed

12 files changed

+1158
-24
lines changed

ReadMe.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
| Year-Day | Task | Scala | Rust | Others |
88
|----------|:-------------------------------------------------------------------------------|:-----------------------------------------------------------------------:|:----------------------------------------------:|:----------------------------------------------------------------------:|
9-
| 2024-01 | [Historian Hysteria](https://adventofcode.com/2024/day/1) | [Scala](scala2/src/main/scala/jurisk/adventofcode/y2024/Advent01.scala) | | |
9+
| 2024-01 | [Historian Hysteria](https://adventofcode.com/2024/day/1) | [Scala](scala2/src/main/scala/jurisk/adventofcode/y2024/Advent01.scala) | [Rust](rust/y2024/src/bin/solution_2024_01.rs) | |
1010
| 2023-01 | [Trebuchet?!](https://adventofcode.com/2023/day/1) | [Scala](scala2/src/main/scala/jurisk/adventofcode/y2023/Advent01.scala) | [Rust](rust/y2023/src/bin/solution_2023_01.rs) | |
1111
| 2023-02 | [Cube Conundrum](https://adventofcode.com/2023/day/2) | [Scala](scala2/src/main/scala/jurisk/adventofcode/y2023/Advent02.scala) | | |
1212
| 2023-03 | [Gear Ratios](https://adventofcode.com/2023/day/3) | [Scala](scala2/src/main/scala/jurisk/adventofcode/y2023/Advent03.scala) | | |

rust/.run/Clippy.run.xml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="Clippy" type="CargoCommandRunConfiguration" factoryName="Cargo Command" nameIsGenerated="true">
3+
<option name="command" value="clippy --all-targets --all-features -- -W clippy::pedantic " />
4+
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
5+
<envs />
6+
<option name="emulateTerminal" value="true" />
7+
<option name="channel" value="DEFAULT" />
8+
<option name="requiredFeatures" value="true" />
9+
<option name="allFeatures" value="false" />
10+
<option name="withSudo" value="false" />
11+
<option name="buildTarget" value="REMOTE" />
12+
<option name="backtrace" value="SHORT" />
13+
<option name="isRedirectInput" value="false" />
14+
<option name="redirectInputPath" value="" />
15+
<method v="2">
16+
<option name="CARGO.BUILD_TASK_PROVIDER" enabled="true" />
17+
</method>
18+
</configuration>
19+
</component>

rust/.run/Tests.run.xml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="Tests" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
3+
<option name="buildProfileId" value="test" />
4+
<option name="command" value="test --workspace" />
5+
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
6+
<envs />
7+
<option name="emulateTerminal" value="true" />
8+
<option name="channel" value="DEFAULT" />
9+
<option name="requiredFeatures" value="true" />
10+
<option name="allFeatures" value="false" />
11+
<option name="withSudo" value="false" />
12+
<option name="buildTarget" value="REMOTE" />
13+
<option name="backtrace" value="SHORT" />
14+
<option name="isRedirectInput" value="false" />
15+
<option name="redirectInputPath" value="" />
16+
<method v="2">
17+
<option name="CARGO.BUILD_TASK_PROVIDER" enabled="true" />
18+
</method>
19+
</configuration>
20+
</component>

rust/Cargo.lock

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/common/src/parsing.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ pub fn normalize_newlines(input: &str) -> String {
266266
pub fn segments_separated_by_double_newline(input: &str) -> Vec<String> {
267267
normalize_newlines(input)
268268
.split("\n\n")
269-
.map(std::string::ToString::to_string)
269+
.map(ToString::to_string)
270270
.filter(|x| !x.is_empty())
271271
.collect()
272272
}

rust/y2024/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ rust-version.workspace = true
1010
workspace = true
1111

1212
[dependencies]
13-
advent-of-code-common = { path = "../common" }
13+
advent-of-code-common = { path = "../common" }
14+
itertools.workspace = true

0 commit comments

Comments
 (0)