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+ */
35use std:: env;
46use 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 }
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+ */
15use aoc:: { ANSI_BOLD , ANSI_ITALIC , ANSI_RESET } ;
26use 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
You can’t perform that action at this time.
0 commit comments