Skip to content

Commit e6f2e79

Browse files
committed
fix formatting
1 parent 3852ffe commit e6f2e79

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

src/systems/polynom.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ macro_rules! impl_one_operator_scalar_trait {
261261
scalar.$operator_fn(rhs)
262262
}
263263
}
264-
264+
265265
impl $operator<$scalar_type> for &$struct_type<$scalar_type>
266266
{
267267
type Output = $struct_type<$scalar_type>;
@@ -1012,8 +1012,7 @@ mod tests {
10121012
let ans: RationalFunction<f64> = 3.0 * rf2;
10131013
assert_abs_diff_eq!(rf1.eval(&1.2), ans.eval(&1.2));
10141014

1015-
1016-
let s = RationalFunction::new_from_coeffs(&[0.0, 1.0], &[1.0]);
1015+
let s = RationalFunction::new_from_coeffs(&[0.0, 1.0], &[1.0]);
10171016
let _ = 1.0 / &s * 10.0 * &s - 3.0 / &s;
10181017
let _ = &s * (1.0 + &s);
10191018
let _ = &s + 1.0 - &s / (1.0 + &s) * &s * (1.0 * &s);

src/systems/state_space.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -691,20 +691,23 @@ macro_rules! impl_comb_ref_and_no_ref_operators {
691691
}
692692
}
693693

694-
impl<U: Time + 'static> $operator<Ss<U>> for &Ss<U>
694+
impl<U: Time + 'static> $operator<Ss<U>> for &Ss<U>
695695
{
696696
type Output = Ss<U>;
697-
fn $operator_fn(self, rhs: Ss<U>) -> Self::Output {
697+
fn $operator_fn(self, rhs: Ss<U>) -> Self::Output {
698698
self.$operator_fn(&rhs)
699699
}
700700
}
701701
)*
702702
};
703703
}
704704

705-
impl_comb_ref_and_no_ref_operators!(
706-
[(Add, add), (Sub, sub), (Mul, mul), (Div, div)]
707-
);
705+
impl_comb_ref_and_no_ref_operators!([
706+
(Add, add),
707+
(Sub, sub),
708+
(Mul, mul),
709+
(Div, div)
710+
]);
708711

709712
impl<U: Time + 'static> fmt::Display for Ss<U> {
710713
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
@@ -1025,7 +1028,6 @@ mod tests {
10251028
assert_abs_diff_eq!(resp1.re, resp2.re, epsilon = 1e-9);
10261029
assert_abs_diff_eq!(resp1.im, resp2.im, epsilon = 1e-9);
10271030

1028-
10291031
let s_inv = (1.0 / Tf::s()).to_ss().unwrap();
10301032
let _ = 1.0 + &s_inv * &s_inv / (1.0 + &s_inv / 1.0);
10311033
}

src/systems/transfer_function.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,12 +402,12 @@ macro_rules! impl_comb_ref_and_no_ref_operators {
402402
}
403403
}
404404

405-
impl<T, U: Time> $operator<$struct_type<T, U>> for &$struct_type<T, U>
405+
impl<T, U: Time> $operator<$struct_type<T, U>> for &$struct_type<T, U>
406406
where
407407
T: $operator<Output = T> + Clone + Zero + One+ Default + Add + AddAssign + Mul<Output = T> + Neg<Output = T> + Copy,
408408
{
409409
type Output = $struct_type<T, U>;
410-
fn $operator_fn(self, rhs: $struct_type<T, U>) -> Self::Output {
410+
fn $operator_fn(self, rhs: $struct_type<T, U>) -> Self::Output {
411411
self.$operator_fn(&rhs)
412412
}
413413
}

0 commit comments

Comments
 (0)