From aaf4ced6426ccdb258f5ca51edf1b750be57a525 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Tue, 4 Jul 2023 13:00:25 +0200 Subject: [PATCH] fix compilation in main branch (#244) --- crates/libsolv_rs/src/conda_util.rs | 9 +++++++-- crates/rattler_solve/src/libsolv_rs/input.rs | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/crates/libsolv_rs/src/conda_util.rs b/crates/libsolv_rs/src/conda_util.rs index 17209ada8..8be3d6212 100644 --- a/crates/libsolv_rs/src/conda_util.rs +++ b/crates/libsolv_rs/src/conda_util.rs @@ -133,10 +133,15 @@ pub(crate) fn find_highest_version( candidates.fold(None, |init, record| { Some(init.map_or_else( - || (record.version.clone(), !record.track_features.is_empty()), + || { + ( + record.version.version().clone(), + !record.track_features.is_empty(), + ) + }, |(version, has_tracked_features)| { ( - version.max(record.version.clone()), + version.max(record.version.version().clone()), has_tracked_features && record.track_features.is_empty(), ) }, diff --git a/crates/rattler_solve/src/libsolv_rs/input.rs b/crates/rattler_solve/src/libsolv_rs/input.rs index 0dae0b2a1..c5030296a 100644 --- a/crates/rattler_solve/src/libsolv_rs/input.rs +++ b/crates/rattler_solve/src/libsolv_rs/input.rs @@ -112,7 +112,7 @@ pub fn add_virtual_packages(pool: &mut Pool, repo_id: RepoId, packages: &[Generi subdir: "".to_string(), timestamp: None, build_number: 0, - version: p.version.clone(), + version: p.version.clone().into(), build: p.build_string.clone(), depends: Vec::new(), features: None,