diff --git a/src/kdtree/mod.rs b/src/kdtree/mod.rs index 2987a78..eb53f62 100644 --- a/src/kdtree/mod.rs +++ b/src/kdtree/mod.rs @@ -54,7 +54,7 @@ impl Kdtree { /// Can be used if you are sure that the tree is degenerated or if you will never again insert the nodes into the tree. pub fn gather_points_and_rebuild(&mut self) { let mut points : Vec = vec![]; - let nodes = self.gather_points(0,&mut points); + self.gather_points(0,&mut points); self.rebuild_tree(&mut points); } diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 5a9a248..0d085c3 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -10,10 +10,6 @@ fn gen_random() -> f64 { rand::thread_rng().gen_range(0., 10000.) } -fn gen_random_usize( max_value : usize) -> usize { - rand::thread_rng().gen_range(0usize, max_value) -} - fn find_nn_with_linear_search<'a>(points : &'a Vec, find_for : Point3WithId) -> &Point3WithId { let distance_fun = kdtree::kdtree::distance::squared_euclidean;