Skip to content

Commit

Permalink
fix cargo fmt --check
Browse files Browse the repository at this point in the history
  • Loading branch information
mthom committed Dec 21, 2023
1 parent 46e432c commit a715496
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/machine/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,7 @@ impl Stack {
}

pub(crate) fn top(&self) -> usize {
unsafe {
(*self.buf.ptr.get()) as usize - self.buf.base as usize
}
unsafe { (*self.buf.ptr.get()) as usize - self.buf.base as usize }
}

pub(crate) fn allocate_or_frame(&mut self, num_cells: usize) -> usize {
Expand Down
13 changes: 11 additions & 2 deletions src/machine/system_calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,13 @@ impl Machine {
match &self.code[bp] {
Instruction::IndexingCode(ref indexing_code) => {
let indexing_code_ptr = match &indexing_code[0] {
&IndexingLine::Indexing(IndexingInstruction::SwitchOnTerm(_, _, c, _, s)) => {
&IndexingLine::Indexing(IndexingInstruction::SwitchOnTerm(
_,
_,
c,
_,
s,
)) => {
if key.1 > 0 {
s
} else {
Expand Down Expand Up @@ -1260,7 +1266,10 @@ impl Machine {
bp -= offset;
}
_ => {
return (skeleton.core.clause_clause_locs.back().cloned().unwrap(), bp);
return (
skeleton.core.clause_clause_locs.back().cloned().unwrap(),
bp,
);
}
}
}
Expand Down

0 comments on commit a715496

Please sign in to comment.