Skip to content

Commit 499d538

Browse files
committed
🙈 remove debug trait
1 parent 5fcc477 commit 499d538

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

downsample_rs/src/fpcs.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use super::minmax;
22
use super::types::Num;
33
use argminmax::{ArgMinMax, NaNArgMinMax};
44
use num_traits::{AsPrimitive, FromPrimitive};
5-
use std::{fmt::Debug, ops::Not};
5+
use std::ops::Not;
66

77
// ------------------------------- Helper datastructures -------------------------------
88
// NOTE: the pub(crate) is added to match the visibility of the fpcs_generic function
@@ -76,7 +76,7 @@ fn fpcs_inner_comp<Ty: PartialOrd + Copy>(
7676
}
7777

7878
#[inline(always)]
79-
fn fpcs_outer_loop<Ty: PartialOrd + Copy + Debug>(
79+
fn fpcs_outer_loop<Ty: PartialOrd + Copy>(
8080
arr: &[Ty],
8181
minmax_idxs: Vec<usize>,
8282
n_out: usize,
@@ -91,7 +91,6 @@ fn fpcs_outer_loop<Ty: PartialOrd + Copy + Debug>(
9191
// Prepend first point
9292
sampled_indices.push(0);
9393

94-
println!("minmax_idxs: {:?}", minmax_idxs);
9594
// Process the min/max pairs
9695
for chunk in minmax_idxs.chunks(2) {
9796
if chunk.len() == 2 {
@@ -136,7 +135,7 @@ macro_rules! fpcs_with_x {
136135
where
137136
for<'a> &'a [Ty]: $trait,
138137
Tx: Num + FromPrimitive + AsPrimitive<f64>,
139-
Ty: Copy + PartialOrd + Debug,
138+
Ty: Copy + PartialOrd,
140139
{
141140
fpcs_generic(x, y, n_out, $f_minmax, $f_fpcs_inner_comp)
142141
}
@@ -160,7 +159,7 @@ fpcs_with_x!(
160159

161160
macro_rules! fpcs_without_x {
162161
($func_name:ident, $trait:path, $f_minmax:expr, $f_fpcs_inner_comp:expr) => {
163-
pub fn $func_name<T: Copy + PartialOrd + Debug>(arr: &[T], n_out: usize) -> Vec<usize>
162+
pub fn $func_name<T: Copy + PartialOrd>(arr: &[T], n_out: usize) -> Vec<usize>
164163
where
165164
for<'a> &'a [T]: $trait,
166165
{
@@ -192,7 +191,7 @@ macro_rules! fpcs_with_x_parallel {
192191
where
193192
for<'a> &'a [Ty]: $trait,
194193
Tx: Num + FromPrimitive + AsPrimitive<f64> + Send + Sync,
195-
Ty: Num + Copy + PartialOrd + Send + Sync + Debug,
194+
Ty: Num + Copy + PartialOrd + Send + Sync,
196195
{
197196
// collect the parrallel iterator to a vector
198197
fpcs_generic(x, y, n_out, $f_argminmax, $f_fpcs_inner_comp)
@@ -217,7 +216,7 @@ fpcs_with_x_parallel!(
217216

218217
macro_rules! fpcs_without_x_parallel {
219218
($func_name:ident, $trait:path, $f_argminmax:expr, $f_fpcs_inner_comp:expr) => {
220-
pub fn $func_name<Ty: Copy + PartialOrd + Send + Sync + Debug>(
219+
pub fn $func_name<Ty: Copy + PartialOrd + Send + Sync>(
221220
arr: &[Ty],
222221
n_out: usize,
223222
) -> Vec<usize>
@@ -248,7 +247,7 @@ fpcs_without_x_parallel!(
248247
// ----------- WITH X
249248

250249
#[inline(always)]
251-
pub(crate) fn fpcs_generic<Tx: Num + AsPrimitive<f64>, Ty: PartialOrd + Copy + Debug>(
250+
pub(crate) fn fpcs_generic<Tx: Num + AsPrimitive<f64>, Ty: PartialOrd + Copy>(
252251
x: &[Tx],
253252
y: &[Ty],
254253
n_out: usize,
@@ -264,7 +263,7 @@ pub(crate) fn fpcs_generic<Tx: Num + AsPrimitive<f64>, Ty: PartialOrd + Copy + D
264263
// ----------- WITHOUT X
265264

266265
#[inline(always)]
267-
pub(crate) fn fpcs_generic_without_x<Ty: PartialOrd + Copy + Debug>(
266+
pub(crate) fn fpcs_generic_without_x<Ty: PartialOrd + Copy>(
268267
arr: &[Ty],
269268
n_out: usize,
270269
f_minmax: fn(&[Ty], usize) -> Vec<usize>,

0 commit comments

Comments
 (0)