diff --git a/src/beachline.rs b/src/beachline.rs index 5038e84..c240694 100644 --- a/src/beachline.rs +++ b/src/beachline.rs @@ -17,6 +17,7 @@ use super::predicate as VP; use super::siteevent as VSE; use super::{BigFloatType, BigIntType, InputType, OutputType}; +use crate::BvError; use std::cell::Cell; use std::cmp::Ordering; use std::collections::BTreeMap; @@ -26,7 +27,6 @@ use std::ops::Bound::{Excluded, Included, Unbounded}; use std::ops::Neg; use std::rc::Rc; use vec_map::VecMap; -use crate::BvError; /// debug utility function pub(crate) fn debug_print_bli_id(value: Option) -> String { @@ -117,7 +117,7 @@ where key } - pub(crate) fn erase(&mut self, beachline_index: BeachLineIndex) -> Result<(),BvError>{ + pub(crate) fn erase(&mut self, beachline_index: BeachLineIndex) -> Result<(), BvError> { //todo is this correct? if let Some(node) = self.beach_line_vec.get(beachline_index.0) { let node = node.0; @@ -125,7 +125,9 @@ where return Err(BvError::SelfIntersecting {txt:"Tried to remove a non-existent beachline, this error can occur if the input data is self-intersecting".to_string()}); } if self.beach_line_.contains_key(&node) { - return Err(BvError::SomeError {txt:"Beachline: internal error there are more identical keys".to_string()}); + return Err(BvError::SomeError { + txt: "Beachline: internal error there are more identical keys".to_string(), + }); } let _ = self.beach_line_vec.remove(beachline_index.0); } else { diff --git a/src/builder.rs b/src/builder.rs index 6c01855..5712f01 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -289,11 +289,11 @@ where } } - pub(crate) fn process_site_event ( + pub(crate) fn process_site_event( &mut self, site_event_iterator_: &mut VSE::SiteEventIndexType, output: &mut VD::VoronoiDiagram, - ) -> Result<(),BvError> { + ) -> Result<(), BvError> { let (mut right_it, last_index) = { // Get next site event to process. let site_event = self.site_events_.get(*site_event_iterator_).unwrap(); @@ -455,7 +455,10 @@ where /// why we use const_cast there and take all the responsibility that /// map data structure keeps correct ordering. #[allow(clippy::unnecessary_unwrap)] - pub(crate) fn process_circle_event(&mut self, output: &mut VD::VoronoiDiagram) -> Result<(),BvError> { + pub(crate) fn process_circle_event( + &mut self, + output: &mut VD::VoronoiDiagram, + ) -> Result<(), BvError> { // Get the topmost circle event. let e = self.circle_events_.top().unwrap(); let circle_event = e.0.get(); diff --git a/tests/segment_test_4.rs b/tests/segment_test_4.rs index c0a5fa3..709c1aa 100644 --- a/tests/segment_test_4.rs +++ b/tests/segment_test_4.rs @@ -1,6 +1,6 @@ use boostvoronoi::builder::Builder; -use boostvoronoi::{BvError, InputType}; use boostvoronoi::Line; +use boostvoronoi::{BvError, InputType}; type I1 = i32; type F1 = f64; @@ -21,7 +21,7 @@ fn to_segments(points: &[[T; 4]]) -> Vec> { } #[test] -fn segment_4_1_intersecting() { +fn segment_4_1_intersecting() { let _output = { let segments: [[I1; 4]; 9] = [ [207, 208, 405, 400], @@ -43,7 +43,6 @@ fn segment_4_1_intersecting() { _output.expect_err("should fail"); } - #[ignore] #[test] fn segment_4_1() -> Result<(), BvError> {