From bcd937b8dcb3fb4ae9de4b07928135ab78dabd9b Mon Sep 17 00:00:00 2001 From: eadf <> Date: Sun, 7 Feb 2021 15:46:03 +0100 Subject: [PATCH] Remove unused imports --- example/piston_gui.rs | 9 ++------- src/lib.rs | 5 ++--- src/voronoi_beachline/tests.rs | 1 + src/voronoi_builder.rs | 12 ++++++------ src/voronoi_builder/tests.rs | 1 + src/voronoi_circleevent.rs | 6 +++--- src/voronoi_diagram.rs | 3 +-- src/voronoi_endpoint.rs | 6 +----- src/voronoi_predicate.rs | 5 ----- src/voronoi_predicate/tests.rs | 2 +- src/voronoi_robust_fpt.rs | 7 ++----- src/voronoi_robust_fpt/robustdif_tests.rs | 1 + src/voronoi_robust_fpt/robustfpt_tests.rs | 1 + src/voronoi_siteevent.rs | 8 +------- src/voronoi_siteevent/tests.rs | 1 + src/voronoi_visual_utils.rs | 1 - 16 files changed, 24 insertions(+), 45 deletions(-) diff --git a/example/piston_gui.rs b/example/piston_gui.rs index 2b5cd28..7b44171 100644 --- a/example/piston_gui.rs +++ b/example/piston_gui.rs @@ -390,7 +390,7 @@ where [400, 200, 200, 200], [529, 242, 367, 107], ]; - let _segments_rust: [[i32; 4]; 355] = [ + let _segments_rust: [[i32; 4]; 352] = [ [402, 20, 395, 20], [408, 23, 402, 20], [476, 27, 469, 26], @@ -607,10 +607,8 @@ where [623, 473, 605, 475], [406, 476, 337, 476], [771, 477, 773, 471], - [406, 476, 406, 476], [26, 471, 28, 478], [407, 478, 406, 476], - [407, 478, 407, 478], [766, 481, 771, 477], [730, 495, 766, 481], [28, 478, 69, 495], @@ -633,7 +631,6 @@ where [407, 561, 407, 560], [502, 562, 506, 562], [405, 562, 407, 561], - [405, 562, 405, 562], [621, 562, 624, 562], [175, 562, 405, 562], [506, 562, 621, 562], @@ -823,7 +820,7 @@ where let hp = Self::coord_i1_to_f1(&i.end); graphics::line( color, - 2.0, + 1.0, [ Self::f1_to_f64(lp.x).into(), Self::f1_to_f64(lp.y).into(), @@ -914,8 +911,6 @@ where let vertex1 = samples[i]; let vertex2 = samples[i + 1]; - //vertex1.deconvolve(&self.shift_); - //vertex2.deconvolve(&self.shift_); graphics::line( color, 1.0, diff --git a/src/lib.rs b/src/lib.rs index 7b2cd8e..fa8a4ff 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,11 +3,11 @@ #![deny(non_upper_case_globals)] #![deny(unused_qualifications)] #![deny(unused_results)] -#![allow(unused_imports)] +#![deny(unused_imports)] use core::fmt::Debug; use num::bigint::BigInt; -use num::FromPrimitive; +//use num::FromPrimitive; use num::ToPrimitive; use num::{Float, NumCast, PrimInt, Zero}; use std::fmt::Display; @@ -15,7 +15,6 @@ use std::hash::Hash; use std::marker::PhantomData; use std::ops::Neg; -//mod voronoi_builder; mod voronoi_beachline; pub mod voronoi_builder; mod voronoi_circleevent; diff --git a/src/voronoi_beachline/tests.rs b/src/voronoi_beachline/tests.rs index b9f0885..9eef3d7 100644 --- a/src/voronoi_beachline/tests.rs +++ b/src/voronoi_beachline/tests.rs @@ -1,3 +1,4 @@ +#![allow(unused_imports)] use super::super::voronoi_beachline as VB; use super::super::voronoi_builder::VoronoiBuilder; use super::super::voronoi_diagram as VD; diff --git a/src/voronoi_builder.rs b/src/voronoi_builder.rs index 0925365..6717d93 100644 --- a/src/voronoi_builder.rs +++ b/src/voronoi_builder.rs @@ -18,14 +18,14 @@ use super::voronoi_predicate as VP; use super::voronoi_siteevent as VSE; use geo::{Coordinate, Line}; -use num::{NumCast, PrimInt}; -use std::cell::Cell; -use std::cmp::Ordering; +//use num::{NumCast, PrimInt}; +//use std::cell::Cell; +//use std::cmp::Ordering; use std::collections::BinaryHeap; -use std::fmt; -use std::hash::Hash; +//use std::fmt; +//use std::hash::Hash; use std::ops::Neg; -use std::rc::Rc; +//use std::rc::Rc; use super::{BigFloatType, BigIntType, InputType, OutputType}; use crate::voronoi_beachline::BeachLineNodeData; diff --git a/src/voronoi_builder/tests.rs b/src/voronoi_builder/tests.rs index 6b2164d..b0a2e9a 100644 --- a/src/voronoi_builder/tests.rs +++ b/src/voronoi_builder/tests.rs @@ -1,3 +1,4 @@ +#![allow(unused_imports)] use super::super::voronoi_diagram::VoronoiDiagram; use super::super::voronoi_error::BVError; use super::VoronoiBuilder; diff --git a/src/voronoi_circleevent.rs b/src/voronoi_circleevent.rs index bac2f55..1ac41ba 100644 --- a/src/voronoi_circleevent.rs +++ b/src/voronoi_circleevent.rs @@ -10,10 +10,10 @@ // Ported from C++ boost 1.74.0 to Rust in 2020 by Eadf (github.com/eadf) use super::voronoi_beachline as VB; -use super::voronoi_diagram as VD; -use super::voronoi_predicate as VP; +//use super::voronoi_diagram as VD; +//use super::voronoi_predicate as VP; -use super::{BigFloatType, BigIntType, InputType, OutputType}; +use super::OutputType; use fnv::FnvHashSet; use ordered_float::OrderedFloat; use rb_tree::RBTree; diff --git a/src/voronoi_diagram.rs b/src/voronoi_diagram.rs index f846016..ec4486d 100644 --- a/src/voronoi_diagram.rs +++ b/src/voronoi_diagram.rs @@ -15,11 +15,10 @@ use super::voronoi_siteevent as VSE; use super::TypeConverter as TCC; pub use super::{BigFloatType, BigIntType, InputType, OutputType}; -use num::{NumCast, PrimInt}; +use num::NumCast; use std::cell::Cell; use std::cmp::Ordering; use std::fmt; -use std::hash::Hash; use std::marker::PhantomData; use std::ops::Neg; use std::rc::Rc; diff --git a/src/voronoi_endpoint.rs b/src/voronoi_endpoint.rs index bc25c26..d7d2f4e 100644 --- a/src/voronoi_endpoint.rs +++ b/src/voronoi_endpoint.rs @@ -10,12 +10,8 @@ // Ported from C++ boost 1.74.0 to Rust in 2020 by Eadf (github.com/eadf) use super::voronoi_beachline as VB; -use super::voronoi_circleevent as VC; -use super::voronoi_diagram as VD; -use super::voronoi_error::BVError; use super::voronoi_predicate as VP; -use super::voronoi_siteevent as VSE; -use super::{BigFloatType, BigIntType, InputType, OutputType}; +use super::InputType; use geo::Coordinate; use std::cmp::Ordering; use std::ops::Neg; diff --git a/src/voronoi_predicate.rs b/src/voronoi_predicate.rs index 596dc2e..cbc074c 100644 --- a/src/voronoi_predicate.rs +++ b/src/voronoi_predicate.rs @@ -22,14 +22,9 @@ use super::TypeConverter as TCC; use super::TypeConverter as TC; use super::{BigFloatType, BigIntType, InputType, OutputType}; use geo::Coordinate; -use num::FromPrimitive; -use num::ToPrimitive; use num::{BigInt, Float, NumCast, PrimInt, Zero}; -use ordered_float::OrderedFloat; use std::cmp; -use std::convert::TryInto; use std::fmt::{Debug, Display}; -use std::hash::Hash; use std::marker::PhantomData; use std::ops::Neg; diff --git a/src/voronoi_predicate/tests.rs b/src/voronoi_predicate/tests.rs index f073d5e..6b9fd6f 100644 --- a/src/voronoi_predicate/tests.rs +++ b/src/voronoi_predicate/tests.rs @@ -1,5 +1,5 @@ +#![allow(unused_imports)] use super::super::voronoi_beachline as VB; -use super::super::voronoi_builder::VoronoiBuilder; use super::super::voronoi_diagram as VD; use super::super::voronoi_diagram::VoronoiDiagram; use super::super::voronoi_error::BVError; diff --git a/src/voronoi_robust_fpt.rs b/src/voronoi_robust_fpt.rs index 51facee..8d564aa 100644 --- a/src/voronoi_robust_fpt.rs +++ b/src/voronoi_robust_fpt.rs @@ -50,14 +50,11 @@ mod robustdif_tests; mod robustfpt_tests; -use super::TypeCheckF as TCF; -use super::TypeCheckI as TCI; -use super::{BigFloatType, BigIntType, InputType, OutputType}; +use super::OutputType; use core::fmt::Debug; -use num::{BigInt, Float, FromPrimitive, Num, NumCast, ToPrimitive, Zero}; +use num::{BigInt, Float, NumCast, ToPrimitive, Zero}; //use num_traits; use ordered_float::OrderedFloat; -use std::convert::TryInto; use std::fmt; use std::marker::PhantomData; use std::ops; diff --git a/src/voronoi_robust_fpt/robustdif_tests.rs b/src/voronoi_robust_fpt/robustdif_tests.rs index 2998f99..e342eaa 100644 --- a/src/voronoi_robust_fpt/robustdif_tests.rs +++ b/src/voronoi_robust_fpt/robustdif_tests.rs @@ -1,3 +1,4 @@ +#![allow(unused_imports)] use super::RobustDif; use super::RobustFpt; diff --git a/src/voronoi_robust_fpt/robustfpt_tests.rs b/src/voronoi_robust_fpt/robustfpt_tests.rs index 58fe785..15036f1 100644 --- a/src/voronoi_robust_fpt/robustfpt_tests.rs +++ b/src/voronoi_robust_fpt/robustfpt_tests.rs @@ -1,3 +1,4 @@ +#![allow(unused_imports)] use super::RobustFpt; use crate::voronoi_robust_fpt as VR; use crate::TypeConverter as TCC; diff --git a/src/voronoi_siteevent.rs b/src/voronoi_siteevent.rs index 17f1a82..3f8a770 100644 --- a/src/voronoi_siteevent.rs +++ b/src/voronoi_siteevent.rs @@ -11,23 +11,17 @@ mod tests; -use super::voronoi_beachline as VB; use super::voronoi_diagram as VD; use super::voronoi_predicate as VP; -use ordered_float::OrderedFloat; use std::cmp::Ordering; use super::{BigFloatType, BigIntType, InputType, OutputType}; -use geo::{Coordinate, Line}; -use num::{NumCast, PrimInt}; -use std::cell::Cell; +use geo::Coordinate; use std::fmt; use std::hash::{Hash, Hasher}; use std::marker::PhantomData; use std::mem; use std::ops::Neg; -use std::rc::Rc; -use std::rc::Weak; pub type SiteEventIndexType = usize; diff --git a/src/voronoi_siteevent/tests.rs b/src/voronoi_siteevent/tests.rs index e0755ab..d06a801 100644 --- a/src/voronoi_siteevent/tests.rs +++ b/src/voronoi_siteevent/tests.rs @@ -1,3 +1,4 @@ +#![allow(unused_imports)] use super::super::voronoi_diagram::VoronoiDiagram; use super::super::voronoi_error::BVError; use super::super::voronoi_siteevent as VSE; diff --git a/src/voronoi_visual_utils.rs b/src/voronoi_visual_utils.rs index 2de6040..bc591e7 100644 --- a/src/voronoi_visual_utils.rs +++ b/src/voronoi_visual_utils.rs @@ -9,7 +9,6 @@ // Ported from C++ boost 1.74.0 to Rust in 2020 by Eadf (github.com/eadf) -use super::voronoi_diagram as VD; use super::{BigFloatType, BigIntType, InputType, OutputType}; use geo::{Coordinate, Line};