Skip to content

Commit e9fc7ab

Browse files
committed
fix: no errors for unused parameters
1 parent 2436340 commit e9fc7ab

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/wrapper.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,10 @@ impl PyNutsSettings {
543543
}
544544

545545
#[setter(mass_matrix_eigval_cutoff)]
546-
fn set_mass_matrix_eigval_cutoff(&mut self, val: f64) -> Result<()> {
546+
fn set_mass_matrix_eigval_cutoff(&mut self, val: Option<f64>) -> Result<()> {
547+
let Some(val) = val else {
548+
return Ok(());
549+
};
547550
match &mut self.inner {
548551
Settings::LowRank(inner) => inner.adapt_options.mass_matrix_options.eigval_cutoff = val,
549552
Settings::Diag(_) => {
@@ -570,7 +573,10 @@ impl PyNutsSettings {
570573
}
571574

572575
#[setter(mass_matrix_gamma)]
573-
fn set_mass_matrix_gamma(&mut self, val: f64) -> Result<()> {
576+
fn set_mass_matrix_gamma(&mut self, val: Option<f64>) -> Result<()> {
577+
let Some(val) = val else {
578+
return Ok(());
579+
};
574580
match &mut self.inner {
575581
Settings::LowRank(inner) => {
576582
inner.adapt_options.mass_matrix_options.gamma = val;

0 commit comments

Comments
 (0)