1
0

Add Point3::from_line()

This commit is contained in:
Stefan Müller
2025-12-10 23:53:10 +01:00
parent 695f08f99f
commit 6d499efd3c
2 changed files with 6 additions and 2 deletions
+1 -2
View File
@@ -21,8 +21,7 @@ impl Playground {
fn junction_boxes<R: BufRead>(reader: R) -> Vec<Point3> {
let mut junction_boxes = Vec::new();
for line in reader.lines().map_while(Result::ok) {
let j: Vec<u64> = line.split(Self::POINT_SPLIT_CHAR).map(|s| s.parse().unwrap()).collect();
junction_boxes.push(Point3(j[0], j[1], j[2]));
junction_boxes.push(Point3::from_line(&line, Self::POINT_SPLIT_CHAR));
}
junction_boxes
}