Skip to content

Commit 6a6a4dd

Browse files
committed
remove dead code
1 parent cbc0e62 commit 6a6a4dd

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

chalk-engine/src/logic.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,10 @@ impl<C: Context> Forest<C> {
328328
infer: &mut dyn InferenceTable<C>,
329329
subgoal: &C::GoalInEnvironment,
330330
) -> Option<(C::UCanonicalGoalInEnvironment, C::UniverseMap)> {
331-
match infer.goal_needs_truncation(context.interner(), subgoal) {
332-
true => None,
333-
false => Some(infer.fully_canonicalize_goal(context.interner(), subgoal)),
331+
if infer.goal_needs_truncation(context.interner(), subgoal) {
332+
None
333+
} else {
334+
Some(infer.fully_canonicalize_goal(context.interner(), subgoal))
334335
}
335336
}
336337

@@ -385,9 +386,10 @@ impl<C: Context> Forest<C> {
385386
// affect completeness when it comes to subgoal abstraction.
386387
let inverted_subgoal = infer.invert_goal(context.interner(), subgoal)?;
387388

388-
match infer.goal_needs_truncation(context.interner(), &inverted_subgoal) {
389-
true => None,
390-
false => Some(infer.fully_canonicalize_goal(context.interner(), &inverted_subgoal)),
389+
if infer.goal_needs_truncation(context.interner(), &inverted_subgoal) {
390+
None
391+
} else {
392+
Some(infer.fully_canonicalize_goal(context.interner(), &inverted_subgoal))
391393
}
392394
}
393395
}

chalk-solve/src/infer.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,6 @@ impl<I: Interner> InferenceTable<I> {
7979
u
8080
}
8181

82-
/// Current maximum universe -- one that can see all existing names.
83-
#[allow(dead_code)]
84-
pub(crate) fn max_universe(&self) -> UniverseIndex {
85-
self.max_universe
86-
}
87-
8882
/// Creates a new inference variable and returns its index. The
8983
/// kind of the variable should be known by the caller, but is not
9084
/// tracked directly by the inference table.

0 commit comments

Comments
 (0)