chore: run rustfmt
This commit is contained in:
parent
00a1c32fc1
commit
ad4d85ec3d
6 changed files with 25 additions and 19 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use std::{any::Any, collections::HashSet};
|
||||
use std::any::Any;
|
||||
use std::collections::HashSet;
|
||||
|
||||
mod bool_ops;
|
||||
mod internal_macros;
|
||||
|
|
@ -10,9 +11,8 @@ pub use bool_ops::*;
|
|||
pub use num_ops::*;
|
||||
pub use traits::*;
|
||||
|
||||
use crate::{ArgusResult, Error};
|
||||
|
||||
use self::iter::AstIter;
|
||||
use crate::{ArgusResult, Error};
|
||||
|
||||
/// All expressions that are numeric
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
|
|
|
|||
|
|
@ -43,9 +43,10 @@ impl<'a> Iterator for AstIter<'a> {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::expr::{Expr, ExprBuilder, ExprRef};
|
||||
use itertools::Itertools;
|
||||
|
||||
use crate::expr::{Expr, ExprBuilder, ExprRef};
|
||||
|
||||
#[test]
|
||||
fn simple_iter() {
|
||||
let mut ctx = ExprBuilder::new();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
use super::{internal_macros, BoolExpr, NumExpr};
|
||||
use std::ops::{Add, Div, Mul, Neg};
|
||||
|
||||
use super::{internal_macros, BoolExpr, NumExpr};
|
||||
|
||||
impl Neg for NumExpr {
|
||||
type Output = NumExpr;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
use std::any::Any;
|
||||
|
||||
use super::{iter::AstIter, ExprRef};
|
||||
use super::iter::AstIter;
|
||||
use super::ExprRef;
|
||||
|
||||
/// A trait representing expressions
|
||||
pub trait Expr {
|
||||
|
|
@ -25,9 +26,10 @@ impl dyn Expr {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use proptest::prelude::*;
|
||||
|
||||
use super::super::{arbitrary, BoolExpr, NumExpr};
|
||||
use super::*;
|
||||
use proptest::prelude::*;
|
||||
|
||||
proptest! {
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -11,14 +11,11 @@
|
|||
pub mod iter;
|
||||
pub mod traits;
|
||||
|
||||
use std::{
|
||||
ops::{RangeFull, RangeInclusive},
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
use crate::{ArgusResult, Error};
|
||||
use std::ops::{RangeFull, RangeInclusive};
|
||||
use std::time::Duration;
|
||||
|
||||
use self::traits::{BaseSignal, LinearInterpolatable};
|
||||
use crate::{ArgusResult, Error};
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub enum InterpolationMethod {
|
||||
|
|
@ -253,9 +250,11 @@ impl<T> BaseSignal for ConstantSignal<T> {
|
|||
#[cfg(test)]
|
||||
pub mod arbitrary {
|
||||
|
||||
use super::*;
|
||||
use itertools::Itertools;
|
||||
use proptest::{prelude::*, sample::SizeRange};
|
||||
use proptest::prelude::*;
|
||||
use proptest::sample::SizeRange;
|
||||
|
||||
use super::*;
|
||||
|
||||
/// Generate an arbitrary list of samples and two indices within the list
|
||||
pub fn samples_and_indices<T>(
|
||||
|
|
@ -312,11 +311,13 @@ pub mod arbitrary {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use core::ops::Bound;
|
||||
|
||||
use paste::paste;
|
||||
use proptest::prelude::*;
|
||||
|
||||
use super::*;
|
||||
|
||||
macro_rules! correctly_create_signals_impl {
|
||||
($ty:ty) => {
|
||||
proptest! {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
use num_traits::Num;
|
||||
use std::{ops::RangeBounds, time::Duration};
|
||||
use std::ops::RangeBounds;
|
||||
use std::time::Duration;
|
||||
|
||||
use crate::ArgusResult;
|
||||
use num_traits::Num;
|
||||
|
||||
use super::{InterpolationMethod, Sample};
|
||||
use crate::ArgusResult;
|
||||
|
||||
/// A general Signal trait
|
||||
pub trait BaseSignal {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue