Clippy fixes

This commit is contained in:
Connor Johnstone
2024-07-23 11:20:20 -04:00
parent 0cfd4f1f5d
commit e27ef0a07c
6 changed files with 24 additions and 19 deletions

View File

@@ -1,10 +1,12 @@
use nalgebra::SVector;
type ProblemFunction<'a, const D: usize, P> = &'a dyn Fn(f64, SVector<f64, D>, &P) -> SVector<f64, D>;
/// The basic ODE object that will be passed around. The type (T) and the size (D) will be
/// determined upon creation of the object
#[derive(Clone, Copy)]
pub struct ODE<'a, const D: usize, P> {
pub f: &'a dyn Fn(f64, SVector<f64, D>, &P) -> SVector<f64, D>,
pub f: ProblemFunction<'a, D, P>,
pub y: SVector<f64, D>,
pub t: f64,
pub params: P,
@@ -16,7 +18,7 @@ pub struct ODE<'a, const D: usize, P> {
impl<'a, const D: usize, P> ODE<'a, D, P> {
pub fn new(
f: &'a (dyn Fn(f64, SVector<f64, D>, &P) -> SVector<f64, D>),
f: ProblemFunction<'a, D, P>,
t0: f64,
t_end: f64,
y0: SVector<f64, D>,