Skip to content

Commit e327f00

Browse files
committed
fix: fix clippy lint
1 parent aae6a8f commit e327f00

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

src/helpers.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
// Use this file if you want to extract sections of your solutions.
2-
// Example import: `use aoc::helpers::example_fn;`
1+
/*
2+
* Use this file if you want to extract helpers from your solutions.
3+
* Example import from this file: `use aoc::helpers::example_fn;`
4+
*/

src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
// This file contains template helpers.
2-
// Prefer `./helpers.rs` if you want to extract code from your solutions.
1+
/*
2+
* This file contains template helpers.
3+
* Prefer `./helpers.rs` if you want to extract code from your solutions.
4+
*/
35
use std::env;
46
use std::fs;
57

@@ -26,7 +28,7 @@ macro_rules! solve {
2628
"{} {}(elapsed: {:.2?}){}",
2729
result, ANSI_ITALIC, elapsed, ANSI_RESET
2830
);
29-
},
31+
}
3032
None => {
3133
println!("not solved.")
3234
}

src/main.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/*
2+
* This file contains template code.
3+
* Unless you want to change how solutions are invoked, this file does not need to be edited.
4+
*/
15
use aoc::{ANSI_BOLD, ANSI_ITALIC, ANSI_RESET};
26
use std::process::Command;
37

@@ -18,7 +22,14 @@ fn main() {
1822
let output = String::from_utf8(cmd.stdout).unwrap();
1923
let is_empty = output.is_empty();
2024

21-
println!("{}", if is_empty { "Not solved." } else { &output.trim() });
25+
println!(
26+
"{}",
27+
if is_empty {
28+
"Not solved."
29+
} else {
30+
output.trim()
31+
}
32+
);
2233

2334
if is_empty {
2435
0_f64

0 commit comments

Comments
 (0)