Skip to content

Commit eb4a672

Browse files
authored
Fix new clippy warnings (#30)
The latest version of `clippy` introduces new warnings for format strings where a variable could be included inline, but isn't. This is causing the CI to fail. Fix the warnings.
1 parent a9bd7ad commit eb4a672

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ impl Model {
388388
row_factors: impl IntoIterator<Item = (Col, f64)>,
389389
) -> Row {
390390
self.try_add_row(bounds, row_factors)
391-
.unwrap_or_else(|e| panic!("HiGHS error: {:?}", e))
391+
.unwrap_or_else(|e| panic!("HiGHS error: {e:?}"))
392392
}
393393

394394
/// Tries to add a new constraint to the highs model.
@@ -432,7 +432,7 @@ impl Model {
432432
row_factors: impl IntoIterator<Item = (Row, f64)>,
433433
) -> Col {
434434
self.try_add_column(col_factor, bounds, row_factors)
435-
.unwrap_or_else(|e| panic!("HiGHS error: {:?}", e))
435+
.unwrap_or_else(|e| panic!("HiGHS error: {e:?}"))
436436
}
437437

438438
/// Tries to add a new variable to the highs model.
@@ -480,7 +480,7 @@ impl Model {
480480
row_duals: Option<&[f64]>,
481481
) {
482482
self.try_set_solution(cols, rows, col_duals, row_duals)
483-
.unwrap_or_else(|e| panic!("HiGHS error: {:?}", e))
483+
.unwrap_or_else(|e| panic!("HiGHS error: {e:?}"))
484484
}
485485

486486
/// Tries to hot-start using an initial guess by passing the column and row primal and dual solution values.
@@ -709,7 +709,7 @@ fn try_handle_status(status: c_int, msg: &str) -> Result<HighsStatus, HighsStatu
709709
match status_enum {
710710
status @ HighsStatus::OK => Ok(status),
711711
status @ HighsStatus::Warning => {
712-
log::warn!("HiGHS emitted a warning: {}", msg);
712+
log::warn!("HiGHS emitted a warning: {msg}");
713713
Ok(status)
714714
}
715715
error => Err(error),

0 commit comments

Comments
 (0)