File tree Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Original file line number Diff line number Diff line change 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
+ */
Original file line number Diff line number Diff line change 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
+ */
3
5
use std:: env;
4
6
use std:: fs;
5
7
@@ -26,7 +28,7 @@ macro_rules! solve {
26
28
"{} {}(elapsed: {:.2?}){}" ,
27
29
result, ANSI_ITALIC , elapsed, ANSI_RESET
28
30
) ;
29
- } ,
31
+ }
30
32
None => {
31
33
println!( "not solved." )
32
34
}
Original file line number Diff line number Diff line change
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
+ */
1
5
use aoc:: { ANSI_BOLD , ANSI_ITALIC , ANSI_RESET } ;
2
6
use std:: process:: Command ;
3
7
@@ -18,7 +22,14 @@ fn main() {
18
22
let output = String :: from_utf8 ( cmd. stdout ) . unwrap ( ) ;
19
23
let is_empty = output. is_empty ( ) ;
20
24
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
+ ) ;
22
33
23
34
if is_empty {
24
35
0_f64
You can’t perform that action at this time.
0 commit comments