Skip to content

Commit

Permalink
fix: toolchain and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
baszalmstra committed Sep 25, 2023
1 parent 6ea5f4f commit 669cad4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.72.0
4 changes: 3 additions & 1 deletion src/solver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,9 @@ impl<VS: VersionSet, N: PackageName + Display, D: DependencyProvider<VS, N>> Sol
fn resolve_dependencies(&mut self, mut level: u32) -> Result<u32, Problem> {
loop {
// Make a decision. If no decision could be made it means the problem is satisfyable.
let Some((candidate, required_by, clause_id)) = self.decide() else {break};
let Some((candidate, required_by, clause_id)) = self.decide() else {
break;
};

// Propagate the decision
level = self.set_propagate_learn(level, candidate, required_by, clause_id)?;
Expand Down
4 changes: 3 additions & 1 deletion tests/solver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ impl DependencyProvider<Range<Pack>> for BundleBoxProvider {
let candidate = self.pool.resolve_solvable(solvable);
let package_name = self.pool.resolve_package_name(candidate.name_id());
let pack = candidate.inner();
let Some(deps) = self.packages.get(package_name).and_then(|v| v.get(pack)) else { return Default::default(); };
let Some(deps) = self.packages.get(package_name).and_then(|v| v.get(pack)) else {
return Default::default();
};

let mut result = Dependencies {
requirements: Vec::with_capacity(deps.dependencies.len()),
Expand Down

0 comments on commit 669cad4

Please sign in to comment.