Skip to content

Commit b8a7b87

Browse files
committed
Fix clippy::redundant_closure
1 parent 2372524 commit b8a7b87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

chalk-engine/src/slg/aggregate.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl<I: Interner> AggregateOps<I> for SlgContextOps<'_, I> {
3131
should_continue: impl std::ops::Fn() -> bool,
3232
) -> Option<Solution<I>> {
3333
let interner = self.program.interner();
34-
let CompleteAnswer { subst, ambiguous } = match answers.next_answer(|| should_continue()) {
34+
let CompleteAnswer { subst, ambiguous } = match answers.next_answer(&should_continue) {
3535
AnswerResult::NoMoreSolutions => {
3636
// No answers at all
3737
return None;
@@ -47,7 +47,7 @@ impl<I: Interner> AggregateOps<I> for SlgContextOps<'_, I> {
4747
};
4848

4949
// Exactly 1 unconditional answer?
50-
let next_answer = answers.peek_answer(|| should_continue());
50+
let next_answer = answers.peek_answer(&should_continue);
5151
if next_answer.is_quantum_exceeded() {
5252
if subst.value.subst.is_identity_subst(interner) {
5353
return Some(Solution::Ambig(Guidance::Unknown));
@@ -95,7 +95,7 @@ impl<I: Interner> AggregateOps<I> for SlgContextOps<'_, I> {
9595
}
9696
}
9797

98-
let new_subst = match answers.next_answer(|| should_continue()) {
98+
let new_subst = match answers.next_answer(&should_continue) {
9999
AnswerResult::Answer(answer1) => answer1.subst,
100100
AnswerResult::Floundered => {
101101
// FIXME: this doesn't trigger for any current tests

0 commit comments

Comments
 (0)