day 14
This commit is contained in:
parent
489eb07dae
commit
b414b6edc7
7
d14/Cargo.lock
generated
Normal file
7
d14/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 = "d05"
|
||||
version = "0.1.0"
|
124
d14/input.txt
124
d14/input.txt
@ -0,0 +1,124 @@
|
||||
495,144 -> 499,144
|
||||
492,40 -> 492,43 -> 484,43 -> 484,50 -> 499,50 -> 499,43 -> 496,43 -> 496,40
|
||||
499,13 -> 499,17 -> 497,17 -> 497,25 -> 505,25 -> 505,17 -> 502,17 -> 502,13
|
||||
504,141 -> 508,141
|
||||
498,135 -> 502,135
|
||||
499,13 -> 499,17 -> 497,17 -> 497,25 -> 505,25 -> 505,17 -> 502,17 -> 502,13
|
||||
511,101 -> 511,96 -> 511,101 -> 513,101 -> 513,93 -> 513,101 -> 515,101 -> 515,94 -> 515,101
|
||||
485,147 -> 490,147
|
||||
483,153 -> 488,153
|
||||
479,151 -> 484,151
|
||||
490,77 -> 490,68 -> 490,77 -> 492,77 -> 492,75 -> 492,77 -> 494,77 -> 494,74 -> 494,77 -> 496,77 -> 496,72 -> 496,77
|
||||
510,141 -> 514,141
|
||||
498,53 -> 498,57 -> 495,57 -> 495,64 -> 508,64 -> 508,57 -> 502,57 -> 502,53
|
||||
511,101 -> 511,96 -> 511,101 -> 513,101 -> 513,93 -> 513,101 -> 515,101 -> 515,94 -> 515,101
|
||||
513,114 -> 513,110 -> 513,114 -> 515,114 -> 515,110 -> 515,114 -> 517,114 -> 517,107 -> 517,114
|
||||
476,153 -> 481,153
|
||||
506,83 -> 506,85 -> 503,85 -> 503,88 -> 513,88 -> 513,85 -> 511,85 -> 511,83
|
||||
507,181 -> 507,171 -> 507,181 -> 509,181 -> 509,173 -> 509,181 -> 511,181 -> 511,176 -> 511,181 -> 513,181 -> 513,176 -> 513,181
|
||||
506,83 -> 506,85 -> 503,85 -> 503,88 -> 513,88 -> 513,85 -> 511,85 -> 511,83
|
||||
515,165 -> 520,165
|
||||
507,181 -> 507,171 -> 507,181 -> 509,181 -> 509,173 -> 509,181 -> 511,181 -> 511,176 -> 511,181 -> 513,181 -> 513,176 -> 513,181
|
||||
508,165 -> 513,165
|
||||
494,155 -> 499,155
|
||||
506,83 -> 506,85 -> 503,85 -> 503,88 -> 513,88 -> 513,85 -> 511,85 -> 511,83
|
||||
487,30 -> 487,31 -> 499,31 -> 499,30
|
||||
497,129 -> 502,129
|
||||
473,155 -> 478,155
|
||||
517,123 -> 522,123
|
||||
511,101 -> 511,96 -> 511,101 -> 513,101 -> 513,93 -> 513,101 -> 515,101 -> 515,94 -> 515,101
|
||||
490,77 -> 490,68 -> 490,77 -> 492,77 -> 492,75 -> 492,77 -> 494,77 -> 494,74 -> 494,77 -> 496,77 -> 496,72 -> 496,77
|
||||
506,83 -> 506,85 -> 503,85 -> 503,88 -> 513,88 -> 513,85 -> 511,85 -> 511,83
|
||||
489,149 -> 494,149
|
||||
507,126 -> 512,126
|
||||
489,144 -> 493,144
|
||||
506,83 -> 506,85 -> 503,85 -> 503,88 -> 513,88 -> 513,85 -> 511,85 -> 511,83
|
||||
513,114 -> 513,110 -> 513,114 -> 515,114 -> 515,110 -> 515,114 -> 517,114 -> 517,107 -> 517,114
|
||||
486,151 -> 491,151
|
||||
498,53 -> 498,57 -> 495,57 -> 495,64 -> 508,64 -> 508,57 -> 502,57 -> 502,53
|
||||
521,126 -> 526,126
|
||||
490,77 -> 490,68 -> 490,77 -> 492,77 -> 492,75 -> 492,77 -> 494,77 -> 494,74 -> 494,77 -> 496,77 -> 496,72 -> 496,77
|
||||
487,155 -> 492,155
|
||||
513,120 -> 518,120
|
||||
499,13 -> 499,17 -> 497,17 -> 497,25 -> 505,25 -> 505,17 -> 502,17 -> 502,13
|
||||
482,149 -> 487,149
|
||||
500,158 -> 500,159 -> 513,159
|
||||
507,181 -> 507,171 -> 507,181 -> 509,181 -> 509,173 -> 509,181 -> 511,181 -> 511,176 -> 511,181 -> 513,181 -> 513,176 -> 513,181
|
||||
507,181 -> 507,171 -> 507,181 -> 509,181 -> 509,173 -> 509,181 -> 511,181 -> 511,176 -> 511,181 -> 513,181 -> 513,176 -> 513,181
|
||||
499,13 -> 499,17 -> 497,17 -> 497,25 -> 505,25 -> 505,17 -> 502,17 -> 502,13
|
||||
492,40 -> 492,43 -> 484,43 -> 484,50 -> 499,50 -> 499,43 -> 496,43 -> 496,40
|
||||
507,181 -> 507,171 -> 507,181 -> 509,181 -> 509,173 -> 509,181 -> 511,181 -> 511,176 -> 511,181 -> 513,181 -> 513,176 -> 513,181
|
||||
490,77 -> 490,68 -> 490,77 -> 492,77 -> 492,75 -> 492,77 -> 494,77 -> 494,74 -> 494,77 -> 496,77 -> 496,72 -> 496,77
|
||||
513,114 -> 513,110 -> 513,114 -> 515,114 -> 515,110 -> 515,114 -> 517,114 -> 517,107 -> 517,114
|
||||
507,181 -> 507,171 -> 507,181 -> 509,181 -> 509,173 -> 509,181 -> 511,181 -> 511,176 -> 511,181 -> 513,181 -> 513,176 -> 513,181
|
||||
499,13 -> 499,17 -> 497,17 -> 497,25 -> 505,25 -> 505,17 -> 502,17 -> 502,13
|
||||
505,168 -> 510,168
|
||||
507,181 -> 507,171 -> 507,181 -> 509,181 -> 509,173 -> 509,181 -> 511,181 -> 511,176 -> 511,181 -> 513,181 -> 513,176 -> 513,181
|
||||
492,40 -> 492,43 -> 484,43 -> 484,50 -> 499,50 -> 499,43 -> 496,43 -> 496,40
|
||||
513,114 -> 513,110 -> 513,114 -> 515,114 -> 515,110 -> 515,114 -> 517,114 -> 517,107 -> 517,114
|
||||
509,117 -> 514,117
|
||||
498,53 -> 498,57 -> 495,57 -> 495,64 -> 508,64 -> 508,57 -> 502,57 -> 502,53
|
||||
511,101 -> 511,96 -> 511,101 -> 513,101 -> 513,93 -> 513,101 -> 515,101 -> 515,94 -> 515,101
|
||||
498,53 -> 498,57 -> 495,57 -> 495,64 -> 508,64 -> 508,57 -> 502,57 -> 502,53
|
||||
503,123 -> 508,123
|
||||
511,101 -> 511,96 -> 511,101 -> 513,101 -> 513,93 -> 513,101 -> 515,101 -> 515,94 -> 515,101
|
||||
513,114 -> 513,110 -> 513,114 -> 515,114 -> 515,110 -> 515,114 -> 517,114 -> 517,107 -> 517,114
|
||||
498,53 -> 498,57 -> 495,57 -> 495,64 -> 508,64 -> 508,57 -> 502,57 -> 502,53
|
||||
510,123 -> 515,123
|
||||
511,101 -> 511,96 -> 511,101 -> 513,101 -> 513,93 -> 513,101 -> 515,101 -> 515,94 -> 515,101
|
||||
513,144 -> 517,144
|
||||
490,77 -> 490,68 -> 490,77 -> 492,77 -> 492,75 -> 492,77 -> 494,77 -> 494,74 -> 494,77 -> 496,77 -> 496,72 -> 496,77
|
||||
501,138 -> 505,138
|
||||
507,144 -> 511,144
|
||||
513,114 -> 513,110 -> 513,114 -> 515,114 -> 515,110 -> 515,114 -> 517,114 -> 517,107 -> 517,114
|
||||
498,53 -> 498,57 -> 495,57 -> 495,64 -> 508,64 -> 508,57 -> 502,57 -> 502,53
|
||||
492,40 -> 492,43 -> 484,43 -> 484,50 -> 499,50 -> 499,43 -> 496,43 -> 496,40
|
||||
492,141 -> 496,141
|
||||
495,138 -> 499,138
|
||||
513,114 -> 513,110 -> 513,114 -> 515,114 -> 515,110 -> 515,114 -> 517,114 -> 517,107 -> 517,114
|
||||
492,40 -> 492,43 -> 484,43 -> 484,50 -> 499,50 -> 499,43 -> 496,43 -> 496,40
|
||||
498,141 -> 502,141
|
||||
501,155 -> 506,155
|
||||
490,77 -> 490,68 -> 490,77 -> 492,77 -> 492,75 -> 492,77 -> 494,77 -> 494,74 -> 494,77 -> 496,77 -> 496,72 -> 496,77
|
||||
490,77 -> 490,68 -> 490,77 -> 492,77 -> 492,75 -> 492,77 -> 494,77 -> 494,74 -> 494,77 -> 496,77 -> 496,72 -> 496,77
|
||||
497,153 -> 502,153
|
||||
504,129 -> 509,129
|
||||
518,129 -> 523,129
|
||||
480,155 -> 485,155
|
||||
513,114 -> 513,110 -> 513,114 -> 515,114 -> 515,110 -> 515,114 -> 517,114 -> 517,107 -> 517,114
|
||||
490,77 -> 490,68 -> 490,77 -> 492,77 -> 492,75 -> 492,77 -> 494,77 -> 494,74 -> 494,77 -> 496,77 -> 496,72 -> 496,77
|
||||
506,83 -> 506,85 -> 503,85 -> 503,88 -> 513,88 -> 513,85 -> 511,85 -> 511,83
|
||||
498,53 -> 498,57 -> 495,57 -> 495,64 -> 508,64 -> 508,57 -> 502,57 -> 502,53
|
||||
492,40 -> 492,43 -> 484,43 -> 484,50 -> 499,50 -> 499,43 -> 496,43 -> 496,40
|
||||
507,181 -> 507,171 -> 507,181 -> 509,181 -> 509,173 -> 509,181 -> 511,181 -> 511,176 -> 511,181 -> 513,181 -> 513,176 -> 513,181
|
||||
525,129 -> 530,129
|
||||
504,135 -> 508,135
|
||||
487,30 -> 487,31 -> 499,31 -> 499,30
|
||||
487,30 -> 487,31 -> 499,31 -> 499,30
|
||||
493,151 -> 498,151
|
||||
514,126 -> 519,126
|
||||
511,101 -> 511,96 -> 511,101 -> 513,101 -> 513,93 -> 513,101 -> 515,101 -> 515,94 -> 515,101
|
||||
507,138 -> 511,138
|
||||
495,37 -> 506,37
|
||||
511,101 -> 511,96 -> 511,101 -> 513,101 -> 513,93 -> 513,101 -> 515,101 -> 515,94 -> 515,101
|
||||
500,126 -> 505,126
|
||||
490,77 -> 490,68 -> 490,77 -> 492,77 -> 492,75 -> 492,77 -> 494,77 -> 494,74 -> 494,77 -> 496,77 -> 496,72 -> 496,77
|
||||
519,168 -> 524,168
|
||||
511,162 -> 516,162
|
||||
490,77 -> 490,68 -> 490,77 -> 492,77 -> 492,75 -> 492,77 -> 494,77 -> 494,74 -> 494,77 -> 496,77 -> 496,72 -> 496,77
|
||||
499,13 -> 499,17 -> 497,17 -> 497,25 -> 505,25 -> 505,17 -> 502,17 -> 502,13
|
||||
507,181 -> 507,171 -> 507,181 -> 509,181 -> 509,173 -> 509,181 -> 511,181 -> 511,176 -> 511,181 -> 513,181 -> 513,176 -> 513,181
|
||||
492,40 -> 492,43 -> 484,43 -> 484,50 -> 499,50 -> 499,43 -> 496,43 -> 496,40
|
||||
506,120 -> 511,120
|
||||
507,181 -> 507,171 -> 507,181 -> 509,181 -> 509,173 -> 509,181 -> 511,181 -> 511,176 -> 511,181 -> 513,181 -> 513,176 -> 513,181
|
||||
501,132 -> 505,132
|
||||
511,129 -> 516,129
|
||||
494,80 -> 507,80
|
||||
506,83 -> 506,85 -> 503,85 -> 503,88 -> 513,88 -> 513,85 -> 511,85 -> 511,83
|
||||
501,144 -> 505,144
|
||||
490,153 -> 495,153
|
||||
512,168 -> 517,168
|
||||
490,77 -> 490,68 -> 490,77 -> 492,77 -> 492,75 -> 492,77 -> 494,77 -> 494,74 -> 494,77 -> 496,77 -> 496,72 -> 496,77
|
||||
507,181 -> 507,171 -> 507,181 -> 509,181 -> 509,173 -> 509,181 -> 511,181 -> 511,176 -> 511,181 -> 513,181 -> 513,176 -> 513,181
|
||||
499,13 -> 499,17 -> 497,17 -> 497,25 -> 505,25 -> 505,17 -> 502,17 -> 502,13
|
||||
500,158 -> 500,159 -> 513,159
|
190
d14/src/a1.rs
190
d14/src/a1.rs
@ -1,4 +1,194 @@
|
||||
use std::{collections::HashSet, hash::Hash};
|
||||
|
||||
|
||||
enum Particle {
|
||||
|
||||
Stone,
|
||||
Sand,
|
||||
RestingSand,
|
||||
|
||||
}
|
||||
|
||||
fn parse_input(inp :&Vec<String>, positions :&mut HashSet<(usize, usize)>) {
|
||||
|
||||
// parse to intermediate form
|
||||
let mut raw_positions :Vec<Vec<(usize, usize)>> = vec![];
|
||||
for line in inp {
|
||||
raw_positions.push(vec![]);
|
||||
|
||||
let pairs :Vec<Vec<usize>> = line.split(" -> ").map(|elem| elem.split(',').map(|i| i.parse::<usize>().unwrap()).collect()).collect();
|
||||
for p in pairs {
|
||||
raw_positions.last_mut().unwrap().push((p[0], p[1]));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// interpolate points
|
||||
for rock_formation in raw_positions {
|
||||
|
||||
for i in 1..rock_formation.len() {
|
||||
|
||||
// one should be 0 while the other one should have a value
|
||||
//let dx = rock_formation[i].0 - rock_formation[i-1].0;
|
||||
let dy = rock_formation[i].1 as i32 - rock_formation[i-1].1 as i32;
|
||||
|
||||
if dy == 0 {
|
||||
|
||||
let min = std::cmp::min(rock_formation[i].0, rock_formation[i-1].0);
|
||||
let max = std::cmp::max(rock_formation[i].0, rock_formation[i-1].0);
|
||||
|
||||
for i2 in min..=max {
|
||||
positions.insert((i2, rock_formation[i].1));
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
let min = std::cmp::min(rock_formation[i].1, rock_formation[i-1].1);
|
||||
let max = std::cmp::max(rock_formation[i].1, rock_formation[i-1].1);
|
||||
|
||||
for i2 in min..=max {
|
||||
positions.insert((rock_formation[i].0, i2));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fn find_borders(positions :&HashSet<(usize, usize)>) -> ((usize, usize), (usize, usize)){
|
||||
|
||||
|
||||
let mut min_x = usize::MAX;
|
||||
let mut min_y = usize::MAX;
|
||||
let mut max_x = 0;
|
||||
let mut max_y = 0;
|
||||
|
||||
for (x, y) in positions {
|
||||
if x < &min_x {
|
||||
min_x = *x;
|
||||
}
|
||||
|
||||
if x > &max_x {
|
||||
max_x = *x;
|
||||
}
|
||||
|
||||
if y < &min_y {
|
||||
min_y = *y;
|
||||
}
|
||||
|
||||
if y > &max_y {
|
||||
max_y = *y;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return ((min_x, max_x), (min_y, max_y));
|
||||
}
|
||||
|
||||
fn print_map(positions :&HashSet<(usize, usize)>, borders :&mut ((usize, usize), (usize, usize)), sand_source :&(usize, usize)) {
|
||||
|
||||
borders.1.0 = std::cmp::min(borders.1.0, sand_source.1);
|
||||
|
||||
let height = (borders.1.1 - borders.1.0 + 1) as usize;
|
||||
let width = (borders.0.1 - borders.0.0 + 1) as usize;
|
||||
|
||||
let mut map = vec![vec!['.'; width]; height];
|
||||
|
||||
for (x, y) in positions {
|
||||
map[(y-borders.1.0) as usize][(x-borders.0.0) as usize] = '#';
|
||||
//println!("({}, {})", x, y);
|
||||
}
|
||||
|
||||
map[sand_source.1 - borders.1.0][sand_source.0 - borders.0.0] = '+';
|
||||
|
||||
for y in map {
|
||||
for x in y {
|
||||
print!("{}", x);
|
||||
}
|
||||
|
||||
println!();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
pub fn run(inp :Vec<String>) {
|
||||
|
||||
const SAND_SOURCE :(usize, usize) = (500, 0);
|
||||
|
||||
let mut solid_objects :HashSet<(usize, usize)> = HashSet::new();
|
||||
|
||||
parse_input(&inp, &mut solid_objects);
|
||||
|
||||
let mut borders = find_borders(&solid_objects);
|
||||
|
||||
//print_map(&solid_objects, &mut borders, &SAND_SOURCE);
|
||||
|
||||
|
||||
let mut fallen_sand = 1;
|
||||
let mut moving_sand :Vec<(usize, usize)> = vec![SAND_SOURCE];
|
||||
|
||||
'outer: loop {
|
||||
|
||||
for i in 0..moving_sand.len() {
|
||||
|
||||
|
||||
if moving_sand[i].0 > borders.0.1 || moving_sand[i].0 < borders.0.0 || moving_sand[i].1 > borders.1.1 {
|
||||
break 'outer;
|
||||
}
|
||||
|
||||
// try down
|
||||
if !solid_objects.contains(&(moving_sand[i].0, moving_sand[i].1 + 1)) {
|
||||
moving_sand[i].1 += 1;
|
||||
} else if !solid_objects.contains(&(moving_sand[i].0 - 1, moving_sand[i].1 + 1)){
|
||||
// else try down left
|
||||
moving_sand[i].1 += 1;
|
||||
moving_sand[i].0 -= 1;
|
||||
} else if !solid_objects.contains(&(moving_sand[i].0 + 1, moving_sand[i].1 + 1)) {
|
||||
// else try down right
|
||||
moving_sand[i].1 += 1;
|
||||
moving_sand[i].0 += 1;
|
||||
|
||||
} else {
|
||||
solid_objects.insert(moving_sand[i].clone());
|
||||
moving_sand[i] = SAND_SOURCE;
|
||||
fallen_sand += 1;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
println!("a1: {}", fallen_sand - 1);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
4 5 5
|
||||
9 0 0
|
||||
4 0 3
|
||||
0 ......+...
|
||||
1 ..........
|
||||
2 ..........
|
||||
3 ..........
|
||||
4 ....x...x#
|
||||
5 ....x...#.
|
||||
6 ..#x#...#.
|
||||
7 ........x.
|
||||
8 ........#.
|
||||
9 #########.
|
||||
|
||||
|
||||
*/
|
215
d14/src/a2.rs
215
d14/src/a2.rs
@ -1,5 +1,220 @@
|
||||
use std::{collections::HashSet, hash::Hash};
|
||||
|
||||
|
||||
enum Particle {
|
||||
|
||||
Stone,
|
||||
Sand,
|
||||
RestingSand,
|
||||
|
||||
}
|
||||
|
||||
fn parse_input(inp :&Vec<String>, positions :&mut HashSet<(i32, i32)>) {
|
||||
|
||||
// parse to intermediate form
|
||||
let mut raw_positions :Vec<Vec<(usize, usize)>> = vec![];
|
||||
for line in inp {
|
||||
raw_positions.push(vec![]);
|
||||
|
||||
let pairs :Vec<Vec<usize>> = line.split(" -> ").map(|elem| elem.split(',').map(|i| i.parse::<usize>().unwrap()).collect()).collect();
|
||||
for p in pairs {
|
||||
raw_positions.last_mut().unwrap().push((p[0], p[1]));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// interpolate points
|
||||
for rock_formation in raw_positions {
|
||||
|
||||
for i in 1..rock_formation.len() {
|
||||
|
||||
// one should be 0 while the other one should have a value
|
||||
//let dx = rock_formation[i].0 - rock_formation[i-1].0;
|
||||
let dy = rock_formation[i].1 as i32 - rock_formation[i-1].1 as i32;
|
||||
|
||||
if dy == 0 {
|
||||
|
||||
let min = std::cmp::min(rock_formation[i].0, rock_formation[i-1].0);
|
||||
let max = std::cmp::max(rock_formation[i].0, rock_formation[i-1].0);
|
||||
|
||||
for i2 in min..=max {
|
||||
positions.insert((i2 as i32, rock_formation[i].1 as i32));
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
let min = std::cmp::min(rock_formation[i].1, rock_formation[i-1].1);
|
||||
let max = std::cmp::max(rock_formation[i].1, rock_formation[i-1].1);
|
||||
|
||||
for i2 in min..=max {
|
||||
positions.insert((rock_formation[i].0 as i32, i2 as i32));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fn find_borders(positions :&HashSet<(i32, i32)>) -> ((i32, i32), (i32, i32)){
|
||||
|
||||
|
||||
let mut min_x = i32::MAX;
|
||||
let mut min_y = i32::MAX;
|
||||
let mut max_x = 0;
|
||||
let mut max_y = 0;
|
||||
|
||||
for (x, y) in positions {
|
||||
if x < &min_x {
|
||||
min_x = *x;
|
||||
}
|
||||
|
||||
if x > &max_x {
|
||||
max_x = *x;
|
||||
}
|
||||
|
||||
if y < &min_y {
|
||||
min_y = *y;
|
||||
}
|
||||
|
||||
if y > &max_y {
|
||||
max_y = *y;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return ((min_x, max_x), (min_y, max_y));
|
||||
}
|
||||
|
||||
fn print_map(positions :&HashSet<(usize, usize)>, borders :&mut ((usize, usize), (usize, usize)), sand_source :&(usize, usize)) {
|
||||
|
||||
borders.1.0 = std::cmp::min(borders.1.0, sand_source.1);
|
||||
|
||||
let height = (borders.1.1 - borders.1.0 + 1) as usize;
|
||||
let width = (borders.0.1 - borders.0.0 + 1) as usize;
|
||||
|
||||
let mut map = vec![vec!['.'; width]; height];
|
||||
|
||||
for (x, y) in positions {
|
||||
map[(y-borders.1.0) as usize][(x-borders.0.0) as usize] = '#';
|
||||
//println!("({}, {})", x, y);
|
||||
}
|
||||
|
||||
map[sand_source.1 - borders.1.0][sand_source.0 - borders.0.0] = '+';
|
||||
|
||||
for y in map {
|
||||
for x in y {
|
||||
print!("{}", x);
|
||||
}
|
||||
|
||||
println!();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fn construct_floor(objects :&mut HashSet<(i32, i32)>, borders :&mut ((i32, i32), (i32, i32))) {
|
||||
|
||||
// floor is 2 units deeper than the max height
|
||||
// instead of an infinie width simulate it by taking the min and max x value and extending it by ~500
|
||||
|
||||
let floor_height = borders.1.1 as i32 + 2;
|
||||
|
||||
let new_min_x :i32 = borders.0.0 as i32 - 500;
|
||||
let new_max_x :i32 = borders.0.1 as i32 + 500;
|
||||
|
||||
borders.0.0 = new_min_x;
|
||||
borders.0.1 = new_max_x;
|
||||
|
||||
for i in new_min_x..=new_max_x {
|
||||
objects.insert((i, floor_height));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
pub fn run(inp :Vec<String>) {
|
||||
|
||||
const SAND_SOURCE :(i32, i32) = (500, 0);
|
||||
|
||||
let mut solid_objects :HashSet<(i32, i32)> = HashSet::new();
|
||||
|
||||
parse_input(&inp, &mut solid_objects);
|
||||
|
||||
let mut borders = find_borders(&solid_objects);
|
||||
|
||||
construct_floor(&mut solid_objects, &mut borders);
|
||||
|
||||
//print_map(&solid_objects, &mut borders, &SAND_SOURCE);
|
||||
|
||||
|
||||
let mut fallen_sand = 1;
|
||||
let mut moving_sand :Vec<(i32, i32)> = vec![SAND_SOURCE];
|
||||
|
||||
'outer: loop {
|
||||
|
||||
for i in 0..moving_sand.len() {
|
||||
|
||||
/*
|
||||
if moving_sand[i].0 > borders.0.1 as i32 || moving_sand[i].0 < borders.0.0 as i32 || moving_sand[i].1 > borders.1.1 as i32 {
|
||||
break 'outer;
|
||||
}
|
||||
*/
|
||||
|
||||
// try down
|
||||
if !solid_objects.contains(&(moving_sand[i].0, moving_sand[i].1 + 1)) {
|
||||
moving_sand[i].1 += 1;
|
||||
} else if !solid_objects.contains(&(moving_sand[i].0 - 1, moving_sand[i].1 + 1)){
|
||||
// else try down left
|
||||
moving_sand[i].1 += 1;
|
||||
moving_sand[i].0 -= 1;
|
||||
} else if !solid_objects.contains(&(moving_sand[i].0 + 1, moving_sand[i].1 + 1)) {
|
||||
// else try down right
|
||||
moving_sand[i].1 += 1;
|
||||
moving_sand[i].0 += 1;
|
||||
|
||||
} else {
|
||||
|
||||
if moving_sand[i].0 == SAND_SOURCE.0 && moving_sand[0].1 == SAND_SOURCE.1 {
|
||||
break 'outer;
|
||||
}
|
||||
|
||||
solid_objects.insert(moving_sand[i].clone());
|
||||
moving_sand[i] = (SAND_SOURCE.0, SAND_SOURCE.1);
|
||||
fallen_sand += 1;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
println!("a1: {}", fallen_sand);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
4 5 5
|
||||
9 0 0
|
||||
4 0 3
|
||||
0 ......+...
|
||||
1 ..........
|
||||
2 ..........
|
||||
3 ..........
|
||||
4 ....x...x#
|
||||
5 ....x...#.
|
||||
6 ..#x#...#.
|
||||
7 ........x.
|
||||
8 ........#.
|
||||
9 #########.
|
||||
|
||||
|
||||
*/
|
1
d14/target/.rustc_info.json
Normal file
1
d14/target/.rustc_info.json
Normal file
@ -0,0 +1 @@
|
||||
{"rustc_fingerprint":15594459422025777716,"outputs":{"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.65.0 (897e37553 2022-11-02)\nbinary: rustc\ncommit-hash: 897e37553bba8b42751c67658967889d11ecd120\ncommit-date: 2022-11-02\nhost: x86_64-pc-windows-msvc\nrelease: 1.65.0\nLLVM version: 15.0.0\n","stderr":""},"8623966523033996810":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\n","stderr":""},"8204103499295538959":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\tfuec\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"pc\"\nwindows\n","stderr":""},"15697416045686424142":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\n","stderr":""},"10376369925670944939":{"success":true,"status":"","code":0,"stdout":"___.exe\nlib___.rlib\n___.dll\n___.dll\n___.lib\n___.dll\nC:\\Users\\tfuec\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"msvc\"\ntarget_family=\"windows\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"windows\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"pc\"\nwindows\n","stderr":""}},"successes":{}}
|
3
d14/target/CACHEDIR.TAG
Normal file
3
d14/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
d14/target/debug/.cargo-lock
Normal file
0
d14/target/debug/.cargo-lock
Normal file
@ -0,0 +1 @@
|
||||
a62220af2acc103e
|
@ -0,0 +1 @@
|
||||
{"rustc":2347157018072859861,"features":"[]","target":16997346216964277088,"profile":7309141686862299243,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug\\.fingerprint\\d05-54bad1502471c435\\dep-bin-d05"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
BIN
d14/target/debug/.fingerprint/d05-54bad1502471c435/dep-bin-d05
Normal file
BIN
d14/target/debug/.fingerprint/d05-54bad1502471c435/dep-bin-d05
Normal file
Binary file not shown.
@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
@ -0,0 +1,8 @@
|
||||
{"message":"unused import: `hash::Hash`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":32,"byte_end":42,"line_start":1,"line_end":1,"column_start":33,"column_end":43,"is_primary":true,"text":[{"text":"use std::{collections::HashSet, hash::Hash};","highlight_start":33,"highlight_end":43}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the unused import","code":null,"level":"help","spans":[{"file_name":"src\\a1.rs","byte_start":30,"byte_end":42,"line_start":1,"line_end":1,"column_start":31,"column_end":43,"is_primary":true,"text":[{"text":"use std::{collections::HashSet, hash::Hash};","highlight_start":31,"highlight_end":43}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: unused import: `hash::Hash`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:1:33\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m1\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse std::{collections::HashSet, hash::Hash};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m= \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"unused import: `hash::Hash`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":32,"byte_end":42,"line_start":1,"line_end":1,"column_start":33,"column_end":43,"is_primary":true,"text":[{"text":"use std::{collections::HashSet, hash::Hash};","highlight_start":33,"highlight_end":43}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the unused import","code":null,"level":"help","spans":[{"file_name":"src\\a2.rs","byte_start":30,"byte_end":42,"line_start":1,"line_end":1,"column_start":31,"column_end":43,"is_primary":true,"text":[{"text":"use std::{collections::HashSet, hash::Hash};","highlight_start":31,"highlight_end":43}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: unused import: `hash::Hash`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:1:33\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m1\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse std::{collections::HashSet, hash::Hash};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^^\u001b[0m\n\n"}
|
||||
{"message":"variable does not need to be mutable","code":{"code":"unused_mut","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":3209,"byte_end":3220,"line_start":131,"line_end":131,"column_start":9,"column_end":20,"is_primary":true,"text":[{"text":" let mut borders = find_borders(&solid_objects); ","highlight_start":9,"highlight_end":20}],"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\\a1.rs","byte_start":3209,"byte_end":3213,"line_start":131,"line_end":131,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":" let mut borders = find_borders(&solid_objects); ","highlight_start":9,"highlight_end":13}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: variable does not need to be mutable\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:131:9\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m131\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let mut borders = find_borders(&solid_objects); \u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m----\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14mhelp: remove this `mut`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m= \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15mnote\u001b[0m\u001b[0m: `#[warn(unused_mut)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"enum `Particle` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":55,"byte_end":63,"line_start":4,"line_end":4,"column_start":6,"column_end":14,"is_primary":true,"text":[{"text":"enum Particle {","highlight_start":6,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: enum `Particle` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:4:6\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m4\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0menum Particle {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m= \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"function `print_map` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":2258,"byte_end":2267,"line_start":95,"line_end":95,"column_start":4,"column_end":13,"is_primary":true,"text":[{"text":"fn print_map(positions :&HashSet<(usize, usize)>, borders :&mut ((usize, usize), (usize, usize)), sand_source :&(usize, usize)) {","highlight_start":4,"highlight_end":13}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: function `print_map` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:95:4\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m95\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mfn print_map(positions :&HashSet<(usize, usize)>, borders :&mut ((usize, usize), (usize, usize)), sand_source :&(usize, usize)) {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^\u001b[0m\n\n"}
|
||||
{"message":"enum `Particle` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":55,"byte_end":63,"line_start":4,"line_end":4,"column_start":6,"column_end":14,"is_primary":true,"text":[{"text":"enum Particle {","highlight_start":6,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: enum `Particle` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:4:6\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m4\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0menum Particle {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^\u001b[0m\n\n"}
|
||||
{"message":"function `print_map` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":2266,"byte_end":2275,"line_start":95,"line_end":95,"column_start":4,"column_end":13,"is_primary":true,"text":[{"text":"fn print_map(positions :&HashSet<(usize, usize)>, borders :&mut ((usize, usize), (usize, usize)), sand_source :&(usize, usize)) {","highlight_start":4,"highlight_end":13}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: function `print_map` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:95:4\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m95\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mfn print_map(positions :&HashSet<(usize, usize)>, borders :&mut ((usize, usize), (usize, usize)), sand_source :&(usize, usize)) {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^\u001b[0m\n\n"}
|
||||
{"message":"7 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: 7 warnings emitted\u001b[0m\n\n"}
|
@ -0,0 +1 @@
|
||||
e737b342d3e62e08
|
@ -0,0 +1 @@
|
||||
{"rustc":2347157018072859861,"features":"[]","target":16997346216964277088,"profile":9251013656241001069,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug\\.fingerprint\\d05-60235cbe9d69ff8a\\dep-bin-d05"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
BIN
d14/target/debug/.fingerprint/d05-60235cbe9d69ff8a/dep-bin-d05
Normal file
BIN
d14/target/debug/.fingerprint/d05-60235cbe9d69ff8a/dep-bin-d05
Normal file
Binary file not shown.
@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
@ -0,0 +1,8 @@
|
||||
{"message":"unused import: `hash::Hash`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":32,"byte_end":42,"line_start":1,"line_end":1,"column_start":33,"column_end":43,"is_primary":true,"text":[{"text":"use std::{collections::HashSet, hash::Hash};","highlight_start":33,"highlight_end":43}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the unused import","code":null,"level":"help","spans":[{"file_name":"src\\a1.rs","byte_start":30,"byte_end":42,"line_start":1,"line_end":1,"column_start":31,"column_end":43,"is_primary":true,"text":[{"text":"use std::{collections::HashSet, hash::Hash};","highlight_start":31,"highlight_end":43}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: unused import: `hash::Hash`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:1:33\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m1\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse std::{collections::HashSet, hash::Hash};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m= \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"unused import: `hash::Hash`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":32,"byte_end":42,"line_start":1,"line_end":1,"column_start":33,"column_end":43,"is_primary":true,"text":[{"text":"use std::{collections::HashSet, hash::Hash};","highlight_start":33,"highlight_end":43}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the unused import","code":null,"level":"help","spans":[{"file_name":"src\\a2.rs","byte_start":30,"byte_end":42,"line_start":1,"line_end":1,"column_start":31,"column_end":43,"is_primary":true,"text":[{"text":"use std::{collections::HashSet, hash::Hash};","highlight_start":31,"highlight_end":43}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: unused import: `hash::Hash`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:1:33\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m1\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse std::{collections::HashSet, hash::Hash};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^^\u001b[0m\n\n"}
|
||||
{"message":"variable does not need to be mutable","code":{"code":"unused_mut","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":3209,"byte_end":3220,"line_start":131,"line_end":131,"column_start":9,"column_end":20,"is_primary":true,"text":[{"text":" let mut borders = find_borders(&solid_objects); ","highlight_start":9,"highlight_end":20}],"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\\a1.rs","byte_start":3209,"byte_end":3213,"line_start":131,"line_end":131,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":" let mut borders = find_borders(&solid_objects); ","highlight_start":9,"highlight_end":13}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: variable does not need to be mutable\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:131:9\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m131\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let mut borders = find_borders(&solid_objects); \u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m----\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14mhelp: remove this `mut`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m= \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15mnote\u001b[0m\u001b[0m: `#[warn(unused_mut)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"enum `Particle` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":55,"byte_end":63,"line_start":4,"line_end":4,"column_start":6,"column_end":14,"is_primary":true,"text":[{"text":"enum Particle {","highlight_start":6,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: enum `Particle` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:4:6\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m4\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0menum Particle {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m= \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"function `print_map` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":2258,"byte_end":2267,"line_start":95,"line_end":95,"column_start":4,"column_end":13,"is_primary":true,"text":[{"text":"fn print_map(positions :&HashSet<(usize, usize)>, borders :&mut ((usize, usize), (usize, usize)), sand_source :&(usize, usize)) {","highlight_start":4,"highlight_end":13}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: function `print_map` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:95:4\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m95\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mfn print_map(positions :&HashSet<(usize, usize)>, borders :&mut ((usize, usize), (usize, usize)), sand_source :&(usize, usize)) {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^\u001b[0m\n\n"}
|
||||
{"message":"enum `Particle` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":55,"byte_end":63,"line_start":4,"line_end":4,"column_start":6,"column_end":14,"is_primary":true,"text":[{"text":"enum Particle {","highlight_start":6,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: enum `Particle` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:4:6\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m4\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0menum Particle {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^\u001b[0m\n\n"}
|
||||
{"message":"function `print_map` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":2266,"byte_end":2275,"line_start":95,"line_end":95,"column_start":4,"column_end":13,"is_primary":true,"text":[{"text":"fn print_map(positions :&HashSet<(usize, usize)>, borders :&mut ((usize, usize), (usize, usize)), sand_source :&(usize, usize)) {","highlight_start":4,"highlight_end":13}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: function `print_map` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:95:4\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m95\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mfn print_map(positions :&HashSet<(usize, usize)>, borders :&mut ((usize, usize), (usize, usize)), sand_source :&(usize, usize)) {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^\u001b[0m\n\n"}
|
||||
{"message":"7 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: 7 warnings emitted\u001b[0m\n\n"}
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
@ -0,0 +1,8 @@
|
||||
{"message":"unused import: `hash::Hash`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":32,"byte_end":42,"line_start":1,"line_end":1,"column_start":33,"column_end":43,"is_primary":true,"text":[{"text":"use std::{collections::HashSet, hash::Hash};","highlight_start":33,"highlight_end":43}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the unused import","code":null,"level":"help","spans":[{"file_name":"src\\a1.rs","byte_start":30,"byte_end":42,"line_start":1,"line_end":1,"column_start":31,"column_end":43,"is_primary":true,"text":[{"text":"use std::{collections::HashSet, hash::Hash};","highlight_start":31,"highlight_end":43}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: unused import: `hash::Hash`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:1:33\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m1\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse std::{collections::HashSet, hash::Hash};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m= \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"unused import: `hash::Hash`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":32,"byte_end":42,"line_start":1,"line_end":1,"column_start":33,"column_end":43,"is_primary":true,"text":[{"text":"use std::{collections::HashSet, hash::Hash};","highlight_start":33,"highlight_end":43}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the unused import","code":null,"level":"help","spans":[{"file_name":"src\\a2.rs","byte_start":30,"byte_end":42,"line_start":1,"line_end":1,"column_start":31,"column_end":43,"is_primary":true,"text":[{"text":"use std::{collections::HashSet, hash::Hash};","highlight_start":31,"highlight_end":43}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: unused import: `hash::Hash`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:1:33\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m1\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse std::{collections::HashSet, hash::Hash};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^^\u001b[0m\n\n"}
|
||||
{"message":"variable does not need to be mutable","code":{"code":"unused_mut","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":3209,"byte_end":3220,"line_start":131,"line_end":131,"column_start":9,"column_end":20,"is_primary":true,"text":[{"text":" let mut borders = find_borders(&solid_objects); ","highlight_start":9,"highlight_end":20}],"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\\a1.rs","byte_start":3209,"byte_end":3213,"line_start":131,"line_end":131,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":" let mut borders = find_borders(&solid_objects); ","highlight_start":9,"highlight_end":13}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: variable does not need to be mutable\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:131:9\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m131\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let mut borders = find_borders(&solid_objects); \u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m----\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14mhelp: remove this `mut`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m= \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15mnote\u001b[0m\u001b[0m: `#[warn(unused_mut)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"enum `Particle` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":55,"byte_end":63,"line_start":4,"line_end":4,"column_start":6,"column_end":14,"is_primary":true,"text":[{"text":"enum Particle {","highlight_start":6,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: enum `Particle` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:4:6\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m4\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0menum Particle {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m= \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"function `print_map` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a1.rs","byte_start":2258,"byte_end":2267,"line_start":95,"line_end":95,"column_start":4,"column_end":13,"is_primary":true,"text":[{"text":"fn print_map(positions :&HashSet<(usize, usize)>, borders :&mut ((usize, usize), (usize, usize)), sand_source :&(usize, usize)) {","highlight_start":4,"highlight_end":13}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: function `print_map` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a1.rs:95:4\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m95\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mfn print_map(positions :&HashSet<(usize, usize)>, borders :&mut ((usize, usize), (usize, usize)), sand_source :&(usize, usize)) {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^\u001b[0m\n\n"}
|
||||
{"message":"enum `Particle` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":55,"byte_end":63,"line_start":4,"line_end":4,"column_start":6,"column_end":14,"is_primary":true,"text":[{"text":"enum Particle {","highlight_start":6,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: enum `Particle` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:4:6\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m4\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0menum Particle {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^\u001b[0m\n\n"}
|
||||
{"message":"function `print_map` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src\\a2.rs","byte_start":2266,"byte_end":2275,"line_start":95,"line_end":95,"column_start":4,"column_end":13,"is_primary":true,"text":[{"text":"fn print_map(positions :&HashSet<(usize, usize)>, borders :&mut ((usize, usize), (usize, usize)), sand_source :&(usize, usize)) {","highlight_start":4,"highlight_end":13}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: function `print_map` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m--> \u001b[0m\u001b[0msrc\\a2.rs:95:4\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;14m95\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mfn print_map(positions :&HashSet<(usize, usize)>, borders :&mut ((usize, usize), (usize, usize)), sand_source :&(usize, usize)) {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;14m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;11m^^^^^^^^^\u001b[0m\n\n"}
|
||||
{"message":"7 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;11mwarning\u001b[0m\u001b[0m\u001b[1m\u001b[38;5;15m: 7 warnings emitted\u001b[0m\n\n"}
|
@ -0,0 +1 @@
|
||||
f0fa31a79957e157
|
@ -0,0 +1 @@
|
||||
{"rustc":2347157018072859861,"features":"[]","target":16997346216964277088,"profile":1021633075455700787,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug\\.fingerprint\\d05-cd6375c08847f9de\\dep-test-bin-d05"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
1
d14/target/debug/d05.d
Normal file
1
d14/target/debug/d05.d
Normal file
@ -0,0 +1 @@
|
||||
C:\personal\Programmierdaten\rust\advent_of_code\y2022\d14\target\debug\d05.exe: C:\personal\Programmierdaten\rust\advent_of_code\y2022\d14\src\a1.rs C:\personal\Programmierdaten\rust\advent_of_code\y2022\d14\src\a2.rs C:\personal\Programmierdaten\rust\advent_of_code\y2022\d14\src\main.rs
|
BIN
d14/target/debug/d05.exe
Normal file
BIN
d14/target/debug/d05.exe
Normal file
Binary file not shown.
BIN
d14/target/debug/d05.pdb
Normal file
BIN
d14/target/debug/d05.pdb
Normal file
Binary file not shown.
7
d14/target/debug/deps/d05-54bad1502471c435.d
Normal file
7
d14/target/debug/deps/d05-54bad1502471c435.d
Normal file
@ -0,0 +1,7 @@
|
||||
c:\personal\Programmierdaten\rust\advent_of_code\y2022\d14\target\debug\deps\d05-54bad1502471c435.rmeta: src\main.rs src\a1.rs src\a2.rs
|
||||
|
||||
c:\personal\Programmierdaten\rust\advent_of_code\y2022\d14\target\debug\deps\d05-54bad1502471c435.d: src\main.rs src\a1.rs src\a2.rs
|
||||
|
||||
src\main.rs:
|
||||
src\a1.rs:
|
||||
src\a2.rs:
|
7
d14/target/debug/deps/d05-cd6375c08847f9de.d
Normal file
7
d14/target/debug/deps/d05-cd6375c08847f9de.d
Normal file
@ -0,0 +1,7 @@
|
||||
c:\personal\Programmierdaten\rust\advent_of_code\y2022\d14\target\debug\deps\d05-cd6375c08847f9de.rmeta: src\main.rs src\a1.rs src\a2.rs
|
||||
|
||||
c:\personal\Programmierdaten\rust\advent_of_code\y2022\d14\target\debug\deps\d05-cd6375c08847f9de.d: src\main.rs src\a1.rs src\a2.rs
|
||||
|
||||
src\main.rs:
|
||||
src\a1.rs:
|
||||
src\a2.rs:
|
7
d14/target/debug/deps/d05.d
Normal file
7
d14/target/debug/deps/d05.d
Normal file
@ -0,0 +1,7 @@
|
||||
C:\personal\Programmierdaten\rust\advent_of_code\y2022\d14\target\debug\deps\d05.exe: src\main.rs src\a1.rs src\a2.rs
|
||||
|
||||
C:\personal\Programmierdaten\rust\advent_of_code\y2022\d14\target\debug\deps\d05.d: src\main.rs src\a1.rs src\a2.rs
|
||||
|
||||
src\main.rs:
|
||||
src\a1.rs:
|
||||
src\a2.rs:
|
BIN
d14/target/debug/deps/d05.exe
Normal file
BIN
d14/target/debug/deps/d05.exe
Normal file
Binary file not shown.
BIN
d14/target/debug/deps/d05.pdb
Normal file
BIN
d14/target/debug/deps/d05.pdb
Normal file
Binary file not shown.
0
d14/target/debug/deps/libd05-54bad1502471c435.rmeta
Normal file
0
d14/target/debug/deps/libd05-54bad1502471c435.rmeta
Normal file
0
d14/target/debug/deps/libd05-cd6375c08847f9de.rmeta
Normal file
0
d14/target/debug/deps/libd05-cd6375c08847f9de.rmeta
Normal 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.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user