) -> 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,
}
}
.map(|occurrences| occurrences.current_branch_num.clone())
.unwrap_or_else(|| BranchNumber::default());
- BranchDesignator {
- branch_num,
- }
+ BranchDesignator { branch_num }
}
#[inline]
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 {
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);
));
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));
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));
}
// 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));