]> Repositorios git - scryer-prolog.git/commitdiff
cargo fmt fixes
authorMark Thom <[email protected]>
Fri, 9 Jan 2026 04:09:12 +0000 (20:09 -0800)
committerMark Thom <[email protected]>
Thu, 15 Jan 2026 04:39:48 +0000 (20:39 -0800)
src/debray_allocator.rs
src/forms.rs
src/machine/disjuncts.rs
src/machine/machine_state_impl.rs

index d214b8c7f7cdc9cedda6cd0ca67154a8f9a5a2be..30fae2041cd86a2161f00c65dc50a0c9dbea70b4 100644 (file)
@@ -85,9 +85,9 @@ impl BranchStack {
     ) -> bool {
         match safety {
             VarSafetyStatus::Needed => false,
-            VarSafetyStatus::LocallyUnneeded(planter_branch) => {
-               planter_branch.branch_num.has_as_subbranch(&branch.branch_num)
-            }
+            VarSafetyStatus::LocallyUnneeded(planter_branch) => planter_branch
+                .branch_num
+                .has_as_subbranch(&branch.branch_num),
             VarSafetyStatus::GloballyUnneeded => true,
         }
     }
@@ -108,9 +108,7 @@ impl BranchStack {
             .map(|occurrences| occurrences.current_branch_num.clone())
             .unwrap_or_else(|| BranchNumber::default());
 
-        BranchDesignator {
-            branch_num,
-        }
+        BranchDesignator { branch_num }
     }
 
     #[inline]
index 65939d58eb7c49607d92f0a981561ce79d258c11..310228e460e36b838c8bb1ede143c4d960b4b1f1 100644 (file)
@@ -164,9 +164,9 @@ impl PartialOrd<BranchNumber> for BranchNumber {
 
 impl BranchNumber {
     pub(crate) fn has_as_subbranch(&self, other: &Self) -> bool {
-       other.delta <= self.delta &&
-           other.branch_num >= self.branch_num &&
-           other.branch_num < &self.branch_num + &self.delta
+        other.delta <= self.delta
+            && other.branch_num >= self.branch_num
+            && other.branch_num < &self.branch_num + &self.delta
     }
 
     pub(crate) fn split(&self) -> BranchNumber {
index 95f4ae5fb1dab5f99cbf2c45eb2fdfd136a30539..09eec4a1080764045f90106c8063055f1e4f6751 100644 (file)
@@ -427,7 +427,8 @@ impl VariableClassifier {
                 TraversalState::ResetCallPolicy(call_policy) => {
                     self.call_policy = call_policy;
                 }
-                TraversalState::BuildDisjunct(preceding_len) | TraversalState::BuildFinalDisjunct(preceding_len) => {
+                TraversalState::BuildDisjunct(preceding_len)
+                | TraversalState::BuildFinalDisjunct(preceding_len) => {
                     let branch_num = self.root_set.pop().unwrap();
                     flatten_into_disjunct(&mut build_stack, branch_num, preceding_len);
 
@@ -566,7 +567,7 @@ impl VariableClassifier {
                             ));
 
                             let iter = branches.into_iter().zip(branch_numbers.into_iter());
-                           let final_disjunct_loc = state_stack.len();
+                            let final_disjunct_loc = state_stack.len();
 
                             for (term, branch_num) in iter.rev() {
                                 state_stack.push(TraversalState::BuildDisjunct(build_stack_len));
@@ -623,7 +624,7 @@ impl VariableClassifier {
 
                             build_stack.reserve_branch(2);
 
-                           state_stack.push(TraversalState::RepBranchNum(
+                            state_stack.push(TraversalState::RepBranchNum(
                                 self.current_branch_num.halve_delta(),
                             ));
                             state_stack.push(TraversalState::BuildFinalDisjunct(build_stack_len));
index 393b646fc3131019550d61e419612b0366177ef1..36a4772c60b9df52eb29b36f348c9d3f51425640 100644 (file)
@@ -934,7 +934,10 @@ impl MachineState {
     }
 
     // see 8.4.4.3 of Draft Technical Corrigendum 2 for an error guide.
-    pub fn key_val_pair(&mut self, value: HeapCellValue) -> Result<(HeapCellValue, HeapCellValue), MachineStub> {
+    pub fn key_val_pair(
+        &mut self,
+        value: HeapCellValue,
+    ) -> Result<(HeapCellValue, HeapCellValue), MachineStub> {
         let stub_gen = || functor_stub(atom!("keysort"), 2);
         let store_v = self.store(self.deref(value));