Skip to content

Commit cef3742

Browse files
committed
fix: formatting
1 parent 9a7834b commit cef3742

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

crates/rattler_solve/src/resolvo/conda_util.rs

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use crate::resolvo::{CondaDependencyProvider, SolverMatchSpec};
2+
use futures::future::FutureExt;
23
use rattler_conda_types::Version;
34
use resolvo::{Dependencies, SolvableId, SolverCache, VersionSetId};
45
use std::cmp::Ordering;
56
use std::collections::HashMap;
6-
use futures::future::FutureExt;
77
/// Returns the order of two candidates based on the order used by conda.
88
#[allow(clippy::too_many_arguments)]
99
pub(super) fn compare_candidates<'a>(
@@ -52,8 +52,14 @@ pub(super) fn compare_candidates<'a>(
5252
// Otherwise, compare the dependencies of the variants. If there are similar
5353
// dependencies select the variant that selects the highest version of the dependency.
5454
let (a_dependencies, b_dependencies) = match (
55-
solver.get_or_cache_dependencies(a).now_or_never().expect("get_or_cache_dependencies failed"),
56-
solver.get_or_cache_dependencies(b).now_or_never().expect("get_or_cache_dependencies failed"),
55+
solver
56+
.get_or_cache_dependencies(a)
57+
.now_or_never()
58+
.expect("get_or_cache_dependencies failed"),
59+
solver
60+
.get_or_cache_dependencies(b)
61+
.now_or_never()
62+
.expect("get_or_cache_dependencies failed"),
5763
) {
5864
(Ok(a_deps), Ok(b_deps)) => (a_deps, b_deps),
5965
// If either call fails, it's likely due to solver cancellation; thus, we can't compare dependencies
@@ -149,8 +155,10 @@ pub(super) fn find_highest_version<'a>(
149155
match_spec_highest_version
150156
.entry(match_spec_id)
151157
.or_insert_with(|| {
152-
let candidates =
153-
solver.get_or_cache_matching_candidates(match_spec_id).now_or_never().expect("get_or_cache_matching_candidates failed");
158+
let candidates = solver
159+
.get_or_cache_matching_candidates(match_spec_id)
160+
.now_or_never()
161+
.expect("get_or_cache_matching_candidates failed");
154162

155163
// Err only happens on cancellation, so we will not continue anyways
156164
let candidates = if let Ok(candidates) = candidates {

0 commit comments

Comments
 (0)