Skip to content

Commit 2a1ac1c

Browse files
committed
day 7: edit Intersections struct attribute name.
1 parent 0a67e63 commit 2a1ac1c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Diff for: src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ pub fn found_intersections(
2828
}
2929
}
3030
println!("{intersections:?}");
31-
Ok(Intersections { intersections })
31+
Ok(Intersections {
32+
inner: intersections,
33+
})
3234
}
3335

3436
pub fn load_from_file(model: String) -> Result<Obj, Box<dyn std::error::Error>> {
@@ -91,7 +93,7 @@ pub fn write_to_file(
9193

9294
let mut current_vertices_count = obj.vertices.len();
9395

94-
intersections.intersections.iter().for_each(|intersection| {
96+
intersections.inner.iter().for_each(|intersection| {
9597
// Calculate the four vertices of the tetrahedron.
9698
let tetrahedron: Tetrahedron = intersection.into();
9799

Diff for: src/types/intersection.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use cgmath::Point3;
22

33
#[derive(Debug)]
44
pub struct Intersections {
5-
pub intersections: Vec<Intersection>,
5+
pub inner: Vec<Intersection>,
66
}
77

88
#[derive(Debug)]

0 commit comments

Comments
 (0)