]> git.proxmox.com Git - rustc.git/blobdiff - vendor/chalk-engine/src/logic.rs
New upstream version 1.61.0+dfsg1
[rustc.git] / vendor / chalk-engine / src / logic.rs
index f8496c72d1d12d4e921c8cfd4e13356dc21dcff5..681f6e7ed12befa06f45645dc59b80dbd554ec09 100644 (file)
@@ -687,7 +687,7 @@ impl<'forest, I: Interner> SolveState<'forest, I> {
                         ex_clause.answer_time.increment();
 
                         // Ok, we've applied the answer to this Strand.
-                        return Ok(());
+                        Ok(())
                     }
 
                     // This answer led nowhere. Give up for now, but of course
@@ -700,7 +700,7 @@ impl<'forest, I: Interner> SolveState<'forest, I> {
 
                         // Now we want to propogate back to the up with `QuantumExceeded`
                         self.unwind_stack();
-                        return Err(RootSearchFail::QuantumExceeded);
+                        Err(RootSearchFail::QuantumExceeded)
                     }
                 }
             }
@@ -749,9 +749,9 @@ impl<'forest, I: Interner> SolveState<'forest, I> {
                 strand.ex_clause.ambiguous = true;
 
                 // Strand is ambigious.
-                return Ok(());
+                Ok(())
             }
-        };
+        }
     }
 
     /// This is called when the selected subgoal for a strand has floundered.
@@ -951,7 +951,7 @@ impl<'forest, I: Interner> SolveState<'forest, I> {
                 Ok(_) => {
                     debug!(?strand, "merged answer into current strand");
                     canonical_strand =
-                        Forest::canonicalize_strand_from(&self.context, &mut infer, &strand);
+                        Forest::canonicalize_strand_from(self.context, &mut infer, &strand);
                     self.stack.top().active_strand = Some(canonical_strand);
                     return Ok(());
                 }
@@ -1224,7 +1224,7 @@ impl<'forest, I: Interner> SolveState<'forest, I> {
 
             // Now we yield with `QuantumExceeded`
             self.unwind_stack();
-            return Err(RootSearchFail::QuantumExceeded);
+            Err(RootSearchFail::QuantumExceeded)
         } else {
             debug!("table part of a cycle");
 
@@ -1267,7 +1267,7 @@ impl<'forest, I: Interner> SolveState<'forest, I> {
             self.forest.tables[table].enqueue_strand(active_strand);
 
             // The strand isn't active, but the table is, so just continue
-            return Ok(());
+            Ok(())
         }
     }
 
@@ -1483,7 +1483,7 @@ impl<'forest, I: Interner> SolveState<'forest, I> {
             .collect();
 
         let subst = Canonical {
-            binders: binders.clone(),
+            binders,
             value: AnswerSubst {
                 subst,
                 constraints: Constraints::from_iter(self.context.program().interner(), constraints),