Skip to content

Commit

Permalink
Update rust toolchain and fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
reinterpretcat committed Jul 25, 2024
1 parent 5d3124b commit aad9c87
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ are already published. So, I stick to it for now.

## [Unreleased]

### Changed

* update rust version


## [1.24.0] 2024-07-13

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.79-alpine AS Builder
FROM rust:1.80-alpine AS Builder

LABEL maintainer="Ilya Builuk <ilya.builuk@gmail.com>" \
org.opencontainers.image.title="A Vehicle Routing Problem solver CLI" \
Expand Down
4 changes: 2 additions & 2 deletions rosomaxa/src/algorithms/math/remedian.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ pub type RemedianUsize = Remedian<usize, fn(&usize, &usize) -> Ordering>;
///
/// References:
/// - P.J. Rousseeuw, G.W. Bassett Jr., "The remedian: A robust averaging method for large data sets",
/// Journal of the American Statistical Association, vol. 85 (1990), pp. 97-104
/// Journal of the American Statistical Association, vol. 85 (1990), pp. 97-104
/// - Domenico Cantone, Micha Hofri, "Further analysis of the remedian algorithm", Theoretical Computer
/// Science, vol. 495 (2013), pp. 1-16
/// Science, vol. 495 (2013), pp. 1-16
pub struct Remedian<T, F>
where
T: Clone,
Expand Down
2 changes: 1 addition & 1 deletion vrp-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ serde_json.workspace = true
csv = { version = "1.3.0", optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
clap = "4.5.9"
clap = "4.5.11"
ctrlc = { version = "3.4.4", features = ["termination"] }
num_cpus = "1.16.0"

Expand Down
2 changes: 1 addition & 1 deletion vrp-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ mod c_interop {
}

#[cfg(feature = "py_bindings")]
#[cfg(all(not(target_arch = "wasm32"), not(tarpaulin)))]
#[cfg(not(target_arch = "wasm32"))]
mod py_interop {
use super::*;
use crate::extensions::solve::config::read_config;
Expand Down
4 changes: 1 addition & 3 deletions vrp-core/src/construction/heuristics/insertions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,12 @@ impl InsertionHeuristic {
/// Runs common insertion heuristic algorithm using given selector specializations.
pub fn process(
&self,
insertion_ctx: InsertionContext,
mut insertion_ctx: InsertionContext,
job_selector: &(dyn JobSelector + Send + Sync),
route_selector: &(dyn RouteSelector + Send + Sync),
leg_selection: &LegSelection,
result_selector: &(dyn ResultSelector + Send + Sync),
) -> InsertionContext {
let mut insertion_ctx = insertion_ctx;

prepare_insertion_ctx(&mut insertion_ctx);

while !insertion_ctx.solution.required.is_empty()
Expand Down
14 changes: 7 additions & 7 deletions vrp-core/src/models/goal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,14 @@ impl GoalBuilder {
/// job values, etc. Each feature consists of three optional parts (but at least one should be defined):
///
/// * **constraint**: an invariant which should be hold to have a feasible VRP solution in the end.
/// A good examples are hard constraints such as capacity, time, travel limits, etc.
/// A good examples are hard constraints such as capacity, time, travel limits, etc.
///
/// * **objective**: an objective of the optimization such as minimization of unassigned jobs or tours.
/// All objectives form together a hierarchy which describes a goal of optimization, including
/// various soft constraints: assignment of preferred jobs, optional breaks, etc. This helps to
/// guide the search on the global objective level (e.g. comparison of various solutions in order to
/// find out which one is "better") and local objective level (e.g. which job should be inserted next
/// into specific solution).
/// All objectives form together a hierarchy which describes a goal of optimization, including
/// various soft constraints: assignment of preferred jobs, optional breaks, etc. This helps to
/// guide the search on the global objective level (e.g. comparison of various solutions in order to
/// find out which one is "better") and local objective level (e.g. which job should be inserted next
/// into specific solution).
///
/// * **state**: the corresponding cached data of constraint/objective to speed up/control their evaluations.
///
Expand All @@ -260,7 +260,7 @@ impl GoalBuilder {
/// * hard constraint can be defined without objective as this is an invariant
/// * state should be used to avoid expensive calculations during insertion evaluation phase.
/// `FeatureObjective::estimate` and `FeatureConstraint::evaluate` methods are called during this phase.
/// Additionally, it can be used to do some solution modifications at `FeatureState::accept_solution_state`.
/// Additionally, it can be used to do some solution modifications at `FeatureState::accept_solution_state`.
#[derive(Clone, Default)]
pub struct Feature {
/// An unique id of the feature.
Expand Down

0 comments on commit aad9c87

Please sign in to comment.