File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ impl EPA {
314314
315315 let mut niter = 0 ;
316316 let mut max_dist = Real :: max_value ( ) ;
317- let mut best_face_id = * self . heap . peek ( ) . unwrap ( ) ;
317+ let mut best_face_id = * self . heap . peek ( ) ? ;
318318 let mut old_dist = 0.0 ;
319319
320320 /*
Original file line number Diff line number Diff line change @@ -117,8 +117,9 @@ impl ConvexPolyhedron {
117117 /// This explicitly computes the convex hull of the given set of points. Use
118118 /// Returns `None` if the convex hull computation failed.
119119 pub fn from_convex_hull ( points : & [ Point < Real > ] ) -> Option < ConvexPolyhedron > {
120- let ( vertices, indices) = crate :: transformation:: convex_hull ( points) ;
121- Self :: from_convex_mesh ( vertices, & indices)
120+ crate :: transformation:: try_convex_hull ( points)
121+ . ok ( )
122+ . and_then ( |( vertices, indices) | Self :: from_convex_mesh ( vertices, & indices) )
122123 }
123124
124125 /// Attempts to create a new solid assumed to be convex from the set of points and indices.
You can’t perform that action at this time.
0 commit comments