Skip to content

Commit c703f66

Browse files
committed
removed the use of default to create unit struct in the mexpreval module
1 parent 0f16b34 commit c703f66

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

modules/mexpreval/src/models.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ impl Model for GenericModel<'_> {
102102
}
103103
}
104104

105-
#[derive(Default)]
106105
struct LotkaVolterra;
107106

108107
impl Model for LotkaVolterra {
@@ -112,7 +111,6 @@ impl Model for LotkaVolterra {
112111
}
113112
}
114113

115-
#[derive(Default)]
116114
struct AlphaPinene;
117115

118116
impl Model for AlphaPinene {
@@ -139,8 +137,8 @@ impl Model for AlphaPinene {
139137

140138
pub fn eval_model_fun(model: &str, ode_expr: &OdeExpr) -> Box<dyn Model> {
141139
match model {
142-
"lotka-volterra" => Box::new(LotkaVolterra::default()),
143-
"alpha-pinene" | "α-pinene" => Box::new(AlphaPinene::default()),
140+
"lotka-volterra" => Box::new(LotkaVolterra),
141+
"alpha-pinene" | "α-pinene" => Box::new(AlphaPinene),
144142
_ => Box::new(GenericModel::new(ode_expr))
145143
}
146144
}

0 commit comments

Comments
 (0)