diff --git a/src/hittable.rs b/src/hittable.rs index c17b5cc..5f3e67c 100644 --- a/src/hittable.rs +++ b/src/hittable.rs @@ -103,17 +103,17 @@ mod test { use super::*; use crate::sphere::Sphere; - fn create_rc_sphere(x: f32, y: f32, z: f32, r: f32) -> rc::Rc { + fn create_rc_sphere(x: f32, y: f32, z: f32, r: f32) -> Arc { let sphere = Sphere::from((x, y, z, r)); - rc::Rc::new(sphere) + Arc::new(sphere) } /// Ensures that creation of the data structure does not fail #[test] fn create_list() { let mut list = HittableList::new(); - let item_1: Rc = create_rc_sphere(0., 1., 2., 50.); - let item_2: Rc = create_rc_sphere(100., 1., 2., 1.); + let item_1: Arc = create_rc_sphere(0., 1., 2., 50.); + let item_2: Arc = create_rc_sphere(100., 1., 2., 1.); list.push(&item_1); list.push(&item_2); @@ -125,8 +125,8 @@ mod test { #[test] fn clear_list() { let mut list = HittableList::new(); - let item_1: Rc = create_rc_sphere(0., 1., 2., 50.); - let item_2: Rc = create_rc_sphere(100., 1., 2., 1.); + let item_1: Arc = create_rc_sphere(0., 1., 2., 50.); + let item_2: Arc = create_rc_sphere(100., 1., 2., 1.); list.push(&item_1); list.push(&item_2); @@ -141,8 +141,8 @@ mod test { #[test] fn hit_one_thing() { let mut list = HittableList::new(); - let item_1: Rc = create_rc_sphere(0., 1., 2., 0.25); - let item_2: Rc = create_rc_sphere(100., 1., 2., 1.); + let item_1: Arc = create_rc_sphere(0., 1., 2., 0.25); + let item_2: Arc = create_rc_sphere(100., 1., 2., 1.); let origin = vec3::Vec3(0., 0., 0.);