Skip to content

Commit f291b71

Browse files
committed
fix: fix compilation warnings when running only with default features (#160)
* fix: fix compilation warnings when running only with default features Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
1 parent 2d75c2c commit f291b71

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ default = ["datasets"]
1717
ndarray-bindings = ["ndarray"]
1818
nalgebra-bindings = ["nalgebra"]
1919
datasets = []
20-
fp_bench = []
20+
fp_bench = ["itertools"]
2121

2222
[dependencies]
2323
ndarray = { version = "0.15", optional = true }
@@ -27,7 +27,7 @@ num = "0.4"
2727
rand = "0.8"
2828
rand_distr = "0.4"
2929
serde = { version = "1", features = ["derive"], optional = true }
30-
itertools = "0.10.3"
30+
itertools = { version = "0.10.3", optional = true }
3131

3232
[target.'cfg(target_arch = "wasm32")'.dependencies]
3333
getrandom = { version = "0.2", features = ["js"] }

src/algorithm/neighbour/fastpair.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(non_snake_case)]
2-
use itertools::Itertools;
31
///
42
/// # FastPair: Data-structure for the dynamic closest-pair problem.
53
///
@@ -177,6 +175,7 @@ impl<'a, T: RealNumber, M: Matrix<T>> FastPair<'a, T, M> {
177175
///
178176
#[cfg(feature = "fp_bench")]
179177
pub fn closest_pair_brute(&self) -> PairwiseDistance<T> {
178+
use itertools::Itertools;
180179
let m = self.samples.shape().0;
181180

182181
let mut closest_pair = PairwiseDistance {

0 commit comments

Comments
 (0)