Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor tweaks #16

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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