cargo fmt fixes

This commit is contained in:
Mark Thom
2026-01-14 20:39:48 -08:00
parent c2e1ded852
commit 1a8c4f9b03
4 changed files with 15 additions and 13 deletions
+4 -6
View File
@@ -85,9 +85,9 @@ impl BranchStack {
) -> bool { ) -> bool {
match safety { match safety {
VarSafetyStatus::Needed => false, VarSafetyStatus::Needed => false,
VarSafetyStatus::LocallyUnneeded(planter_branch) => { VarSafetyStatus::LocallyUnneeded(planter_branch) => planter_branch
planter_branch.branch_num.has_as_subbranch(&branch.branch_num) .branch_num
} .has_as_subbranch(&branch.branch_num),
VarSafetyStatus::GloballyUnneeded => true, VarSafetyStatus::GloballyUnneeded => true,
} }
} }
@@ -108,9 +108,7 @@ impl BranchStack {
.map(|occurrences| occurrences.current_branch_num.clone()) .map(|occurrences| occurrences.current_branch_num.clone())
.unwrap_or_else(|| BranchNumber::default()); .unwrap_or_else(|| BranchNumber::default());
BranchDesignator { BranchDesignator { branch_num }
branch_num,
}
} }
#[inline] #[inline]
+3 -3
View File
@@ -164,9 +164,9 @@ impl PartialOrd<BranchNumber> for BranchNumber {
impl BranchNumber { impl BranchNumber {
pub(crate) fn has_as_subbranch(&self, other: &Self) -> bool { pub(crate) fn has_as_subbranch(&self, other: &Self) -> bool {
other.delta <= self.delta && other.delta <= self.delta
other.branch_num >= self.branch_num && && other.branch_num >= self.branch_num
other.branch_num < &self.branch_num + &self.delta && other.branch_num < &self.branch_num + &self.delta
} }
pub(crate) fn split(&self) -> BranchNumber { pub(crate) fn split(&self) -> BranchNumber {
+2 -1
View File
@@ -427,7 +427,8 @@ impl VariableClassifier {
TraversalState::ResetCallPolicy(call_policy) => { TraversalState::ResetCallPolicy(call_policy) => {
self.call_policy = 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(); let branch_num = self.root_set.pop().unwrap();
flatten_into_disjunct(&mut build_stack, branch_num, preceding_len); flatten_into_disjunct(&mut build_stack, branch_num, preceding_len);
+4 -1
View File
@@ -934,7 +934,10 @@ impl MachineState {
} }
// see 8.4.4.3 of Draft Technical Corrigendum 2 for an error guide. // 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 stub_gen = || functor_stub(atom!("keysort"), 2);
let store_v = self.store(self.deref(value)); let store_v = self.store(self.deref(value));