File tree 2 files changed +17
-10
lines changed
2 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ pub fn execute_credentials(args: &Credentials) {
41
41
/// Executes the "input" subcommand of the app
42
42
pub fn execute_input ( args : & Input ) -> Result < ( ) , Box < dyn Error > > {
43
43
// Gets the token or exit if it's not referenced.
44
- let token = CredentialsManager :: new ( ) . get_session_token ( ) . expect (
45
- "Error: you need to setup your AOC token using \" cargo aoc credentials {token} \" " ,
46
- ) ;
44
+ let token = CredentialsManager :: new ( )
45
+ . get_session_token ( )
46
+ . expect ( "Error: you need to setup your AOC token using \" cargo aoc credentials {token} \" " ) ;
47
47
48
48
let pm = ProjectManager :: new ( ) ?;
49
49
Original file line number Diff line number Diff line change 1
1
use aoc_runner_derive::{ aoc, aoc_generator} ;
2
- #[aoc_generator({ DAY } )]
2
+ #[aoc_generator(REP )]
3
3
fn parse(input: &str) -> String {
4
4
todo! ()
5
5
}
6
6
7
- #[aoc({ DAY } , part1)]
7
+ #[aoc(REP , part1)]
8
8
fn part1(input: &str) -> String {
9
9
todo! ()
10
10
}
11
11
12
- #[aoc({ DAY } , part2)]
12
+ #[aoc(REP , part2)]
13
13
fn part2(input: &str) -> String {
14
14
todo! ()
15
15
}
16
16
17
-
18
17
#[cfg(test)]
19
18
mod tests {
20
19
use super::*;
21
20
22
21
#[test]
23
22
fn part1_example() {
24
- assert_eq! (part1(&parse(" <EXAMPLE>" )), " <RESULT>" );
23
+ let input = " " ;
24
+ let output = " " ;
25
+
26
+ let input = parse(input);
27
+ assert_eq! (part1(input), output);
25
28
}
26
29
27
30
#[test]
28
31
fn part2_example() {
29
- assert_eq! (part2(&parse(" <EXAMPLE>" )), " <RESULT>" );
32
+ let input = " " ;
33
+ let output = " " ;
34
+
35
+ let input = parse(input);
36
+ assert_eq! (part2(input), output);
30
37
}
31
- }
38
+ }
You can’t perform that action at this time.
0 commit comments