From 6636e04f2eb64514e2eb70ddbb20eef6e98ce446 Mon Sep 17 00:00:00 2001 From: Arthur Bit-Monnot Date: Tue, 12 Dec 2023 14:32:38 +0100 Subject: [PATCH] lint: Fix clippy lints --- planning/planners/src/encode.rs | 2 +- validator/src/utils.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/planning/planners/src/encode.rs b/planning/planners/src/encode.rs index 5b02a8fc..f985f5df 100644 --- a/planning/planners/src/encode.rs +++ b/planning/planners/src/encode.rs @@ -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() } } diff --git a/validator/src/utils.rs b/validator/src/utils.rs index 6f9eeff7..0bdedf5d 100644 --- a/validator/src/utils.rs +++ b/validator/src/utils.rs @@ -5,7 +5,7 @@ use regex::Regex; /// /// For example, extracts `(0, 100)` from `'integer[0, 100]'`. pub fn extract_bounds(input: &str) -> Result> { - 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();