fix cargo fmt --check

This commit is contained in:
Mark
2023-12-21 10:24:01 -07:00
parent 46e432c4d9
commit a7154968d8
2 changed files with 12 additions and 5 deletions

View File

@@ -204,9 +204,7 @@ impl Stack {
} }
pub(crate) fn top(&self) -> usize { pub(crate) fn top(&self) -> usize {
unsafe { unsafe { (*self.buf.ptr.get()) as usize - self.buf.base as usize }
(*self.buf.ptr.get()) as usize - self.buf.base as usize
}
} }
pub(crate) fn allocate_or_frame(&mut self, num_cells: usize) -> usize { pub(crate) fn allocate_or_frame(&mut self, num_cells: usize) -> usize {

View File

@@ -1201,7 +1201,13 @@ impl Machine {
match &self.code[bp] { match &self.code[bp] {
Instruction::IndexingCode(ref indexing_code) => { Instruction::IndexingCode(ref indexing_code) => {
let indexing_code_ptr = match &indexing_code[0] { let indexing_code_ptr = match &indexing_code[0] {
&IndexingLine::Indexing(IndexingInstruction::SwitchOnTerm(_, _, c, _, s)) => { &IndexingLine::Indexing(IndexingInstruction::SwitchOnTerm(
_,
_,
c,
_,
s,
)) => {
if key.1 > 0 { if key.1 > 0 {
s s
} else { } else {
@@ -1260,7 +1266,10 @@ impl Machine {
bp -= offset; bp -= offset;
} }
_ => { _ => {
return (skeleton.core.clause_clause_locs.back().cloned().unwrap(), bp); return (
skeleton.core.clause_clause_locs.back().cloned().unwrap(),
bp,
);
} }
} }
} }