chore: run linter and fix formatting

This commit is contained in:
Anand Balakrishnan 2023-08-30 16:02:03 -07:00
parent 3b3a7ce15e
commit 73921db5f9
7 changed files with 8 additions and 6 deletions

View file

@ -9,7 +9,7 @@ itertools = "0.10.5"
paste = "1.0.12" paste = "1.0.12"
num-traits = "0.2.15" num-traits = "0.2.15"
thiserror = "1.0.39" thiserror = "1.0.39"
proptest = { version = "1.1.0", optional = true } proptest = { version = "1.1", optional = true }
enum_dispatch = "0.3.11" enum_dispatch = "0.3.11"
argus-derive = { version = "0.1.0", path = "../argus-derive" } argus-derive = { version = "0.1.0", path = "../argus-derive" }

View file

@ -358,6 +358,8 @@ impl ExprBuilder {
#[cfg(any(test, feature = "arbitrary"))] #[cfg(any(test, feature = "arbitrary"))]
pub mod arbitrary { pub mod arbitrary {
#![allow(clippy::arc_with_non_send_sync)]
//! Helper functions to generate arbitrary expressions using [`mod@proptest`]. //! Helper functions to generate arbitrary expressions using [`mod@proptest`].
use proptest::prelude::*; use proptest::prelude::*;

View file

@ -448,7 +448,7 @@ pub mod arbitrary {
ts.dedup(); ts.dedup();
ts.into_iter() ts.into_iter()
.map(Duration::from_secs) .map(Duration::from_secs)
.zip(values.clone().into_iter()) .zip(values.clone())
.collect::<Vec<_>>() .collect::<Vec<_>>()
}) })
}) })

View file

@ -34,7 +34,7 @@ impl<T> Signal<T> {
match self { match self {
Empty => Signal::Empty, Empty => Signal::Empty,
Constant { value } => Signal::constant(op(value)), Constant { value } => Signal::constant(op(value)),
Sampled { values, time_points } => zip(time_points.into_iter(), values.into_iter().map(op)).collect(), Sampled { values, time_points } => zip(time_points, values.into_iter().map(op)).collect(),
} }
} }

View file

@ -11,4 +11,4 @@ paste = "1.0.12"
[dev-dependencies] [dev-dependencies]
argus-core = { path = "../argus-core", features = ["arbitrary"] } argus-core = { path = "../argus-core", features = ["arbitrary"] }
proptest = "1.1.0" proptest = "1.1"

View file

@ -235,7 +235,7 @@ fn compute_timed_eventually(signal: Signal<bool>, a: Duration, b: Option<Duratio
) )
} }
} }
Signal::try_from_iter(ret_vals.into_iter()) Signal::try_from_iter(ret_vals)
} }
None => { None => {
// Shift the signal to the left by `a` and then run the untimed eventually. // Shift the signal to the left by `a` and then run the untimed eventually.

View file

@ -286,7 +286,7 @@ fn compute_timed_eventually(signal: Signal<f64>, a: Duration, b: Option<Duration
) )
} }
} }
Signal::try_from_iter(ret_vals.into_iter()) Signal::try_from_iter(ret_vals)
} }
None => { None => {
// Shift the signal to the left by `a` and then run the untimed eventually. // Shift the signal to the left by `a` and then run the untimed eventually.