cosmetic changes.

This commit is contained in:
Mark Thom
2016-12-26 14:09:24 -07:00
parent 92ab8406ef
commit 9be3445517
3 changed files with 12 additions and 10 deletions

View File

@@ -20,7 +20,7 @@ type Heap = Vec<HeapCell>;
type Registers = Vec<HeapCell>;
pub struct MachineState {
pub struct Machine {
h : usize,
s : usize,
pub fail : bool,
@@ -30,9 +30,9 @@ pub struct MachineState {
registers : Registers
}
impl MachineState {
pub fn new() -> MachineState {
MachineState { h : 0,
impl Machine {
pub fn new() -> Machine {
Machine { h : 0,
s : 0,
fail : false,
heap : Vec::with_capacity(256),
@@ -195,7 +195,7 @@ impl MachineState {
pub fn reset_heap(&mut self) {
let program = self.program.take();
*self = MachineState::new();
*self = Machine::new();
self.program = program;
}