Skip to content

Commit

Permalink
Merge pull request #16 from ephemient/ephemient-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
ephemient authored Dec 2, 2024
2 parents 1b45caa + ba5c1dc commit 45b3a4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion kt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Run [kotlinx.benchmark](https://github.com/Kotlin/kotlinx-benchmark) ([JMH](http
Print solutions for the inputs provided in local data files:

```sh
./gradlew :aoc2024-exe:jvmRun :aoc2024-exe:runReleaseExecutable{LinuxX64,Macos{X64,Arm64}} :aoc2024-exe:jsNodeProductionRun
./gradlew :aoc2024-exe:jvmRun :aoc2024-exe:runReleaseExecutable{LinuxX64,Macos{X64,Arm64}} :aoc2024-exe:{js,wasmJs}NodeProductionRun
```

Run all checks, including [Detekt](https://detekt.github.io/) static code analysis:
Expand Down
3 changes: 1 addition & 2 deletions rs/src/day2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ fn is_safe_2(report: &[i32]) -> bool {
if report.is_empty() {
return true;
}
let mut report2 = vec![0; report.len() - 1];
report2.copy_from_slice(&report[1..]);
let mut report2 = report[1..].to_vec();
is_safe_1(&report2)
|| (0..report2.len()).any(|i| {
report2[i] = report[i];
Expand Down

0 comments on commit 45b3a4a

Please sign in to comment.