feat!(core): Use new AST structure

Derive Expr methods using a derive proc-macro. These macros are present in
the `argus-derive` crate, but the traits are defined in `argus-core`
This commit is contained in:
Anand Balakrishnan 2023-06-06 10:44:45 -04:00
parent 70c5a50d22
commit 1c79847a77
No known key found for this signature in database
22 changed files with 958 additions and 702 deletions

View file

@ -1,7 +1,7 @@
use core::iter::zip;
use core::time::Duration;
use itertools::{enumerate, Itertools};
use itertools::Itertools;
use super::traits::LinearInterpolatable;
use super::{InterpolationMethod, Signal};
@ -23,7 +23,7 @@ where
// Find the first index that satisfies `t >= delta` while also checking
// if we need to interpolate
let Some((idx, first_t)) = time_points.into_iter().find_position(|&t| t >= &delta)
let Some((idx, first_t)) = time_points.iter().find_position(|&t| t >= &delta)
else {
// Return an empty signal (we exhauseted all samples).
return Signal::Empty;