Remove redundant alias resolution in at_end_of_stream/1, add corresponding tests for null streams

Also fixed at_end_of_stream/0 leaving a choicepoint.
This commit is contained in:
Emilie Burgun
2025-02-07 14:59:32 +01:00
parent 8966e175f1
commit f45b0bcfe8
3 changed files with 78 additions and 12 deletions

View File

@@ -510,9 +510,12 @@ impl Machine {
self.indices.streams.insert(self.user_error);
let mut null_options = StreamOptions::default();
null_options.set_alias_to_atom_opt(Some(atom!("null_stream")));
self.indices
.stream_aliases
.insert(atom!("null_stream"), Stream::Null(StreamOptions::default()));
.insert(atom!("null_stream"), Stream::Null(null_options));
}
#[inline(always)]