wrap stream instances in one Rc<RefCell<..>>, use Ref/RefMut to access stream options

This commit is contained in:
Mark Thom
2021-02-21 16:28:30 -07:00
parent d5581ffd05
commit a323a4dd8e
5 changed files with 132 additions and 98 deletions

View File

@@ -308,7 +308,7 @@ impl MachineState {
)?;
if stream.past_end_of_stream() {
if EOFAction::Reset != stream.options.eof_action {
if EOFAction::Reset != stream.options().eof_action {
return return_from_clause!(self.last_call, self);
} else if self.fail {
return Ok(());
@@ -402,7 +402,7 @@ impl MachineState {
3,
)?;
if orig_stream.options.eof_action == EOFAction::Reset {
if orig_stream.options().eof_action == EOFAction::Reset {
if self.fail == false {
continue;
}