Skip to content

Commit d6384d8

Browse files
committed
add debug assert
1 parent 86232b4 commit d6384d8

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/solvers/lp_solvers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ impl<T: SolverTrait> SolverModel for Model<T> {
136136
}
137137
}
138138

139-
impl<T> crate::solvers::WithTimeLimit for Model<T>
139+
impl<T> WithTimeLimit for Model<T>
140140
where
141141
T: lp_solvers::solvers::WithMaxSeconds<T>,
142142
{

src/solvers/lpsolve.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,16 @@ impl ModelWithSOS1 for LpSolveProblem {
148148
variables.push(var.index().try_into().expect("too many vars"));
149149
}
150150
let name = CString::new("sos").unwrap();
151-
debug_assert_eq!(self.0.add_sos_constraint(
152-
&name,
153-
SOSType::Type1,
154-
1,
155-
weights.as_mut_slice(),
156-
variables.as_mut_slice(),
157-
), Ok(()));
151+
debug_assert_eq!(
152+
self.0.add_sos_constraint(
153+
&name,
154+
SOSType::Type1,
155+
1,
156+
weights.as_mut_slice(),
157+
variables.as_mut_slice(),
158+
),
159+
Ok(())
160+
);
158161
}
159162
}
160163

0 commit comments

Comments
 (0)