day 20 was a doozy
This commit is contained in:
parent
02452722bf
commit
14d98a5f48
8
day20/.idea/.gitignore
vendored
Normal file
8
day20/.idea/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
11
day20/.idea/day20.iml
Normal file
11
day20/.idea/day20.iml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="EMPTY_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
8
day20/.idea/modules.xml
Normal file
8
day20/.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/day20.iml" filepath="$PROJECT_DIR$/.idea/day20.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
6
day20/.idea/vcs.xml
Normal file
6
day20/.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
7
day20/Cargo.lock
generated
Normal file
7
day20/Cargo.lock
generated
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
version = 3
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "day20"
|
||||||
|
version = "0.1.0"
|
0
day20/output.svg
Normal file
0
day20/output.svg
Normal file
@ -1,3 +1,312 @@
|
|||||||
fn main() {
|
use std::{env, fs};
|
||||||
println!("Hello, world!");
|
use std::collections::{HashMap, HashSet, VecDeque};
|
||||||
|
use Module::{Broadcaster, Conjunction, FlipFlop, Counter};
|
||||||
|
use crate::PulseKind::{High, Low};
|
||||||
|
|
||||||
|
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
|
||||||
|
enum PulseKind { High, Low }
|
||||||
|
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
struct Pulse { kind: PulseKind, origin: String, destination: String }
|
||||||
|
|
||||||
|
enum Module {
|
||||||
|
Broadcaster { out: Vec<String> },
|
||||||
|
Conjunction { out: Vec<String>, memory: HashMap<String, PulseKind> },
|
||||||
|
FlipFlop { out: Vec<String>, state: bool },
|
||||||
|
Counter { out: Vec<String>, high: i32, low: i32}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
println!("Hello, AoC day 19!");
|
||||||
|
|
||||||
|
let args: Vec<String> = env::args().collect();
|
||||||
|
if args.len() != 2 {
|
||||||
|
println!("wrong number of arguments!");
|
||||||
|
std::process::exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
let file_path = &args[1];
|
||||||
|
let contents = fs::read_to_string(file_path).expect("Should have been able to read the file");
|
||||||
|
|
||||||
|
let mut rack: HashMap<String, Module> = HashMap::new();
|
||||||
|
for line in contents.lines() {
|
||||||
|
let (name, connections) = line.split_once(" -> ").unwrap();
|
||||||
|
let outputs: Vec<String> = connections.split(", ").map(|it| it.to_string()).collect();
|
||||||
|
match name.chars().nth(0).unwrap() {
|
||||||
|
'&' => rack.insert(name[1..].to_string(), Conjunction { out: outputs, memory: HashMap::new() } ),
|
||||||
|
'%' => rack.insert(name[1..].to_string(), FlipFlop { out: outputs, state: false } ),
|
||||||
|
_ => rack.insert(name.to_string(), Broadcaster { out: outputs } ),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// print out the rack and also tally up the listed outputs
|
||||||
|
println!("the rack looks like this:");
|
||||||
|
let mut all_listed_outputs: HashSet<String> = HashSet::new();
|
||||||
|
for (key, value) in &rack {
|
||||||
|
match value {
|
||||||
|
Broadcaster { out } => {
|
||||||
|
println!("{} -> {}", key, out.join(", "));
|
||||||
|
for o in out { all_listed_outputs.insert(o.to_string()); }
|
||||||
|
}
|
||||||
|
Conjunction { out, .. } => {
|
||||||
|
println!("&{} -> {}", key, out.join(", "));
|
||||||
|
for o in out { all_listed_outputs.insert(o.to_string()); }
|
||||||
|
}
|
||||||
|
FlipFlop { out, .. } => {
|
||||||
|
println!("%{} -> {}", key, out.join(", "));
|
||||||
|
for o in out { all_listed_outputs.insert(o.to_string()); }
|
||||||
|
}
|
||||||
|
Counter { out, .. } => {
|
||||||
|
println!("${} -> {}", key, out.join(", "));
|
||||||
|
for o in out { all_listed_outputs.insert(o.to_string()); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// make sure all the outputs are present as outputs
|
||||||
|
for label in all_listed_outputs {
|
||||||
|
if rack.get(&label).is_none() {
|
||||||
|
rack.insert(label, Counter{ out: Vec::new(), high: 0, low: 0});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
println!("let's fix up those conjunction modules so they know about all their inputs and are initialized properly to low.");
|
||||||
|
let mut conjunctions_and_inputs: HashMap<String, Vec<String>> = HashMap::new();
|
||||||
|
|
||||||
|
// go through and take note of every cnojunction module in our conjunctions_and_inputs collection
|
||||||
|
for (label, _module) in &rack {
|
||||||
|
match rack.get(label).unwrap() {
|
||||||
|
Conjunction{ out:_,memory:_} => { conjunctions_and_inputs.insert(label.to_string(), Vec::new()); }
|
||||||
|
_ => {} // get fucked!!!
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// look at every module. if it's got a conjunction in the output, list it in the collection of conjunctions and inputs
|
||||||
|
for (label, value) in &rack {
|
||||||
|
match value {
|
||||||
|
Broadcaster{ out } => {
|
||||||
|
for o in out {
|
||||||
|
if let Conjunction { .. } = rack.get(o).unwrap() {
|
||||||
|
conjunctions_and_inputs.get_mut(o).unwrap().push(label.to_string())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Conjunction{ out, .. } => {
|
||||||
|
for o in out {
|
||||||
|
if let Conjunction { .. } = rack.get(o).unwrap() {
|
||||||
|
conjunctions_and_inputs.get_mut(o).unwrap().push(label.to_string())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FlipFlop{ out, .. } => {
|
||||||
|
for o in out {
|
||||||
|
if let Conjunction { .. } = rack.get(o).unwrap() {
|
||||||
|
conjunctions_and_inputs.get_mut(o).unwrap().push(label.to_string())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Counter { out, .. } => {
|
||||||
|
for o in out {
|
||||||
|
if let Conjunction { .. } = rack.get(o).unwrap() {
|
||||||
|
conjunctions_and_inputs.get_mut(o).unwrap().push(label.to_string())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// connect each input t othe cnojunctino module
|
||||||
|
for (destination, inputs) in conjunctions_and_inputs {
|
||||||
|
for start in inputs {
|
||||||
|
connect(start, destination.to_string(), &mut rack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let mut high = 0;
|
||||||
|
let mut low = 0;
|
||||||
|
for _i in 0..1000 {
|
||||||
|
let (h, l) = push_the_button_and_count(&mut rack);
|
||||||
|
println!("there were {high} high pulses and {low} low pulses.");
|
||||||
|
high += h;
|
||||||
|
low += l;
|
||||||
|
}
|
||||||
|
println!("after 1000 pushes, we have sent {low} low pulses and {high} high pulses");
|
||||||
|
let product = (high as i64) * (low as i64);
|
||||||
|
println!("that's aproduct of {product}");
|
||||||
|
|
||||||
|
println!("the set of things outputting to rx is:");
|
||||||
|
let mut goes_to_rx: HashSet<String> = HashSet::new();
|
||||||
|
for (name, module) in &rack {
|
||||||
|
match module {
|
||||||
|
Broadcaster { out, .. } => { if out.contains(&String::from("rx")) {goes_to_rx.insert(name.to_string());} }
|
||||||
|
Conjunction { out, .. } => {if out.contains(&String::from("rx")) {goes_to_rx.insert(name.to_string());}}
|
||||||
|
FlipFlop { out, .. } => {if out.contains(&String::from("rx")) {goes_to_rx.insert(name.to_string());}}
|
||||||
|
Counter { out, .. } => {if out.contains(&String::from("rx")) {goes_to_rx.insert(name.to_string());}}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
println!("{goes_to_rx:?}");
|
||||||
|
if let Conjunction{memory, ..} = rack.get(goes_to_rx.iter().nth(0).unwrap()).unwrap() {
|
||||||
|
for x in memory.keys() {
|
||||||
|
print!("{x}, ");
|
||||||
|
}
|
||||||
|
println!("are all options for what we're interestd in");
|
||||||
|
}
|
||||||
|
|
||||||
|
let things_to_watch: HashSet<String> = String::from("qq,sj,ls,bg").split(',').map(|x| x.to_string()).collect();
|
||||||
|
let mut i=1001;
|
||||||
|
loop {
|
||||||
|
let interest = push_the_button_and_watch(&mut rack, &things_to_watch, goes_to_rx.iter().nth(0).unwrap().to_string());
|
||||||
|
|
||||||
|
if interest {
|
||||||
|
println!("interesting things have happened on press {i}");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if i % 100_000 == 0 {
|
||||||
|
if let Counter { low, .. } = rack.get("rx").unwrap() {
|
||||||
|
println!("rx has been hit with a low pulse {low} times after {i} buttons.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
i+=1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fn connect(origin: String, dest_conj: String, rack: &mut HashMap<String, Module>) {
|
||||||
|
let conjunction_module = rack.get_mut(&dest_conj).unwrap();
|
||||||
|
if let Conjunction { memory, ..} = conjunction_module {
|
||||||
|
memory.insert(origin, Low);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn push_the_button_and_count(rack: &mut HashMap<String, Module>) -> (i32, i32) {
|
||||||
|
let mut pulses = VecDeque::from([Pulse {
|
||||||
|
kind: Low,
|
||||||
|
origin: String::from("button"),
|
||||||
|
destination: String::from("broadcaster") }]);
|
||||||
|
let mut high = 0;
|
||||||
|
let mut low = 0;
|
||||||
|
while !pulses.is_empty() {
|
||||||
|
let pulse = pulses.pop_front().unwrap();
|
||||||
|
let _origin = pulse.origin.to_string();
|
||||||
|
let _dest = pulse.destination.to_string();
|
||||||
|
let _kind = match pulse.kind {
|
||||||
|
High => { "high" }
|
||||||
|
Low => { "low" }
|
||||||
|
};
|
||||||
|
//println!("{origin} -{kind}-> {dest}");
|
||||||
|
match pulse.kind {
|
||||||
|
High => { high += 1; }
|
||||||
|
Low => { low += 1; }
|
||||||
|
}
|
||||||
|
let new_pulses = handle_pulse(&pulse, rack);
|
||||||
|
for x in new_pulses {
|
||||||
|
pulses.push_back(x);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (high, low);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn push_the_button_and_watch(rack: &mut HashMap<String, Module>,
|
||||||
|
modules_to_watch: &HashSet<String>,
|
||||||
|
conjunction: String) -> bool {
|
||||||
|
let mut pulses = VecDeque::from([Pulse {
|
||||||
|
kind: Low,
|
||||||
|
origin: String::from("button"),
|
||||||
|
destination: String::from("broadcaster") }]);
|
||||||
|
let mut high = 0;
|
||||||
|
let mut low = 0;
|
||||||
|
let mut of_interest = false;
|
||||||
|
while !pulses.is_empty() {
|
||||||
|
let pulse = pulses.pop_front().unwrap();
|
||||||
|
|
||||||
|
let _origin = pulse.origin.to_string();
|
||||||
|
let _dest = pulse.destination.to_string();
|
||||||
|
let _kind = match pulse.kind {
|
||||||
|
High => { "high" }
|
||||||
|
Low => { "low" }
|
||||||
|
};
|
||||||
|
|
||||||
|
if modules_to_watch.contains(&_origin) && pulse.kind == Low {
|
||||||
|
if let Conjunction {memory, ..} = &rack.get(&conjunction).unwrap() {
|
||||||
|
let pulses: HashSet<&PulseKind>= modules_to_watch.iter().map(|x| memory.get(x).unwrap()).collect();
|
||||||
|
if pulses.contains(&High) {
|
||||||
|
of_interest = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//println!("{origin} -{kind}-> {dest}");
|
||||||
|
let new_pulses = handle_pulse(&pulse, rack);
|
||||||
|
for x in new_pulses {
|
||||||
|
pulses.push_back(x);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return of_interest;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn handle_pulse(pulse: &Pulse, rack: &mut HashMap<String, Module>) -> Vec<Pulse> {
|
||||||
|
// a pulse has arrived!~ let's handle it.
|
||||||
|
let destination_module = rack.get_mut(&pulse.destination).unwrap();
|
||||||
|
|
||||||
|
match destination_module {
|
||||||
|
Broadcaster{ out } => {
|
||||||
|
// broadcast to all the outputs!
|
||||||
|
return out.iter().map(|d| Pulse {
|
||||||
|
kind: pulse.kind,
|
||||||
|
origin: pulse.destination.to_string(),
|
||||||
|
destination: d.to_string() }).collect(); }
|
||||||
|
|
||||||
|
Conjunction{ out, memory} => {
|
||||||
|
// update the memory.
|
||||||
|
memory.insert(pulse.origin.to_string(), pulse.kind);
|
||||||
|
|
||||||
|
// go through the memories and look for one thats low, in which case we output a low pulse.
|
||||||
|
for value in memory.values() {
|
||||||
|
if *value == Low {
|
||||||
|
// if any of the memories is low, output a high pulse
|
||||||
|
return out.iter().map(|d| Pulse {
|
||||||
|
kind: High,
|
||||||
|
origin: pulse.destination.to_string(),
|
||||||
|
destination: d.to_string() }).collect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// if we've gotten here, all the memories were high, so send a low pulse
|
||||||
|
out.iter().map(|d| Pulse {
|
||||||
|
kind: Low,
|
||||||
|
origin: pulse.destination.to_string(),
|
||||||
|
destination: d.to_string() }).collect()}
|
||||||
|
|
||||||
|
FlipFlop{ out, state} => {
|
||||||
|
match pulse.kind {
|
||||||
|
High => {
|
||||||
|
// on a high pulse, flip flops produce nothijng
|
||||||
|
Vec::new()
|
||||||
|
},
|
||||||
|
Low => {
|
||||||
|
// on a low pulse, we flip it, and then send an appropriate pulse (high if it's on, low if it's off)
|
||||||
|
*state = !*state;
|
||||||
|
out.iter().map(|d| Pulse {
|
||||||
|
kind: match state { true => High, false => Low },
|
||||||
|
origin: pulse.destination.to_string(),
|
||||||
|
destination: d.to_string() }).collect()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Counter { high, low, ..} => {
|
||||||
|
match pulse.kind {
|
||||||
|
High => {
|
||||||
|
*high += 1;
|
||||||
|
},
|
||||||
|
Low => {
|
||||||
|
*low += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Vec::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
1
day20/target/.rustc_info.json
Normal file
1
day20/target/.rustc_info.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"rustc_fingerprint":14318102787793507742,"outputs":{"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/shoofle/.rustup/toolchains/stable-x86_64-apple-darwin\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"cmpxchg16b\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_feature=\"sse4.1\"\ntarget_feature=\"ssse3\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.74.1 (a28077b28 2023-12-04)\nbinary: rustc\ncommit-hash: a28077b28a02b92985b3a3faecf92813155f1ea1\ncommit-date: 2023-12-04\nhost: x86_64-apple-darwin\nrelease: 1.74.1\nLLVM version: 17.0.4\n","stderr":""}},"successes":{}}
|
3
day20/target/CACHEDIR.TAG
Normal file
3
day20/target/CACHEDIR.TAG
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Signature: 8a477f597d28d172789f06886806bc55
|
||||||
|
# This file is a cache directory tag created by cargo.
|
||||||
|
# For information about cache directory tags see https://bford.info/cachedir/
|
0
day20/target/debug/.cargo-lock
Normal file
0
day20/target/debug/.cargo-lock
Normal file
@ -0,0 +1 @@
|
|||||||
|
18e6038189945265
|
@ -0,0 +1 @@
|
|||||||
|
{"rustc":4443399816165520464,"features":"[]","target":14331336351448024546,"profile":237655285757591511,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/day20-5957a2c0ba2264ed/dep-bin-day20"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
Binary file not shown.
@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
@ -0,0 +1,5 @@
|
|||||||
|
{"message":"unused variable: `high`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":8317,"byte_end":8321,"line_start":217,"line_end":217,"column_start":13,"column_end":17,"is_primary":true,"text":[{"text":" let mut high = 0;","highlight_start":13,"highlight_end":17}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_variables)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":8317,"byte_end":8321,"line_start":217,"line_end":217,"column_start":13,"column_end":17,"is_primary":true,"text":[{"text":" let mut high = 0;","highlight_start":13,"highlight_end":17}],"label":null,"suggested_replacement":"_high","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused variable: `high`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:217:13\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m217\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let mut high = 0;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33mhelp: if this is intentional, prefix it with an underscore: `_high`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_variables)]` on by default\u001b[0m\n\n"}
|
||||||
|
{"message":"unused variable: `low`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":8339,"byte_end":8342,"line_start":218,"line_end":218,"column_start":13,"column_end":16,"is_primary":true,"text":[{"text":" let mut low = 0;","highlight_start":13,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"if this is intentional, prefix it with an underscore","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":8339,"byte_end":8342,"line_start":218,"line_end":218,"column_start":13,"column_end":16,"is_primary":true,"text":[{"text":" let mut low = 0;","highlight_start":13,"highlight_end":16}],"label":null,"suggested_replacement":"_low","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused variable: `low`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:218:13\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m218\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let mut low = 0;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33mhelp: if this is intentional, prefix it with an underscore: `_low`\u001b[0m\n\n"}
|
||||||
|
{"message":"variable does not need to be mutable","code":{"code":"unused_mut","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":8313,"byte_end":8321,"line_start":217,"line_end":217,"column_start":9,"column_end":17,"is_primary":true,"text":[{"text":" let mut high = 0;","highlight_start":9,"highlight_end":17}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_mut)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove this `mut`","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":8313,"byte_end":8317,"line_start":217,"line_end":217,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":" let mut high = 0;","highlight_start":9,"highlight_end":13}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: variable does not need to be mutable\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:217:9\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m217\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let mut high = 0;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m----\u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: remove this `mut`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_mut)]` on by default\u001b[0m\n\n"}
|
||||||
|
{"message":"variable does not need to be mutable","code":{"code":"unused_mut","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":8335,"byte_end":8342,"line_start":218,"line_end":218,"column_start":9,"column_end":16,"is_primary":true,"text":[{"text":" let mut low = 0;","highlight_start":9,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove this `mut`","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":8335,"byte_end":8339,"line_start":218,"line_end":218,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":" let mut low = 0;","highlight_start":9,"highlight_end":13}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: variable does not need to be mutable\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:218:9\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m218\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let mut low = 0;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m----\u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: remove this `mut`\u001b[0m\n\n"}
|
||||||
|
{"message":"4 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 4 warnings emitted\u001b[0m\n\n"}
|
@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
@ -0,0 +1 @@
|
|||||||
|
a91978ac461ff54b
|
@ -0,0 +1 @@
|
|||||||
|
{"rustc":4443399816165520464,"features":"[]","target":14331336351448024546,"profile":13053956386274884697,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/day20-cb29eaa541c15fba/dep-test-bin-day20"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
@ -0,0 +1 @@
|
|||||||
|
20ff0026cf63a8b5
|
@ -0,0 +1 @@
|
|||||||
|
{"rustc":4443399816165520464,"features":"[]","target":14331336351448024546,"profile":13396965805329499462,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/day20-e42180e615e523fc/dep-bin-day20"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
@ -0,0 +1 @@
|
|||||||
|
This file has an mtime of when this was started.
|
BIN
day20/target/debug/day20
Executable file
BIN
day20/target/debug/day20
Executable file
Binary file not shown.
1
day20/target/debug/day20.d
Normal file
1
day20/target/debug/day20.d
Normal file
@ -0,0 +1 @@
|
|||||||
|
/Users/shoofle/Projects/aoc_2023/day20/target/debug/day20: /Users/shoofle/Projects/aoc_2023/day20/src/main.rs
|
BIN
day20/target/debug/deps/day20-5957a2c0ba2264ed
Executable file
BIN
day20/target/debug/deps/day20-5957a2c0ba2264ed
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5
day20/target/debug/deps/day20-5957a2c0ba2264ed.d
Normal file
5
day20/target/debug/deps/day20-5957a2c0ba2264ed.d
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
/Users/shoofle/Projects/aoc_2023/day20/target/debug/deps/day20-5957a2c0ba2264ed: src/main.rs
|
||||||
|
|
||||||
|
/Users/shoofle/Projects/aoc_2023/day20/target/debug/deps/day20-5957a2c0ba2264ed.d: src/main.rs
|
||||||
|
|
||||||
|
src/main.rs:
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user