Skip to content

Commit

Permalink
lint: Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
arbimo committed Dec 12, 2023
1 parent db7b168 commit 6636e04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion planning/planners/src/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ pub fn add_metric(pb: &FiniteProblem, model: &mut Model, metric: Metric) -> IAto
let to_minimize = model.new_ivar(INT_CST_MIN, INT_CST_MAX, VarLabel(Container::Base, VarType::Cost));
let sum = LinearSum::zero() + to_maximize - to_minimize;
model.enforce(sum.clone().leq(0), []);
model.enforce(sum.clone().geq(0), []);
model.enforce(sum.geq(0), []);
to_minimize.into()
}
}
Expand Down
2 changes: 1 addition & 1 deletion validator/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use regex::Regex;
///
/// For example, extracts `(0, 100)` from `'integer[0, 100]'`.
pub fn extract_bounds(input: &str) -> Result<Option<(i64, i64)>> {
let re = Regex::new(r#"\[(-?\d+), (-?\d+)\]"#).unwrap();
let re = Regex::new(r"\[(-?\d+), (-?\d+)\]").unwrap();
if let Some(captures) = re.captures(input) {
let lower: i64 = captures[1].parse().unwrap();
let upper: i64 = captures[2].parse().unwrap();
Expand Down

0 comments on commit 6636e04

Please sign in to comment.