···5566[workspace]
7788-members = [
99- "advent_core",
1010- "macros",
1111- "utils",
1212- "years/*"
1313-]
88+members = ["advent_core", "macros", "utils", "years/*"]
1491510# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1611
+1-1
advent_core/src/lib.rs
···7788pub use bootstrap::make_year;
99pub use day::Day;
1010-pub use parser::{DP, Selection, YDP, get_dp_and_input, get_ydp_and_input};
1010+pub use parser::{get_dp_and_input, get_ydp_and_input, Selection, DP, YDP};
1111pub use year::Year;
···4242 let lhs = s.next().unwrap().to_string();
4343 let op = s.next().unwrap();
4444 let rhs = s.next().unwrap().to_string();
4545- let target = s.skip(1).next().unwrap().to_string();
4545+ let target = s.nth(1).unwrap().to_string();
4646 let op = match op {
4747 "AND" => Op::And,
4848 "OR" => Op::Or,
···134134// #2 & #5, ^
135135// #4 & #5, ^
136136//
137137-fn test_adder(num: usize, carry_input: &String, gates: &Gates) -> AdderTestResult {
137137+fn test_adder(num: usize, carry_input: &str, gates: &Gates) -> AdderTestResult {
138138 let x = format!("x{num:02}");
139139 let y = format!("y{num:02}");
140140 let z = format!("z{num:02}");
···153153 ) {
154154 if let Some(Gate {
155155 target: z_target, ..
156156- }) = find_gate(gates, &carry_input, xy_xor_target.as_str(), Op::Xor)
156156+ }) = find_gate(gates, carry_input, xy_xor_target.as_str(), Op::Xor)
157157 {
158158 if *z_target != z {
159159 // We know gate #3 is pointing to the wrong target, as it should be pointing to z[]
···173173174174 // From here we've checked all test cases, we can confidently attempt to find the carry
175175 // output now
176176- let carry_xy_target = &find_gate(&gates, xy_xor_target, &carry_input, Op::And)
176176+ let carry_xy_target = &find_gate(gates, xy_xor_target, carry_input, Op::And)
177177 .expect("Failed to find carry_xy_target")
178178 .target;
179179- let carry_out = &find_gate(&gates, carry_xy_target, xy_and_target, Op::Or)
179179+ let carry_out = &find_gate(gates, carry_xy_target, xy_and_target, Op::Or)
180180 .expect("Failed to find carry_out")
181181 .target;
182182 if *carry_out == format!("z{:02}", num + 1) {