set past end of stream, set Byte to -1, Char and Code to end_of_file, at end of stream (#479)
This commit is contained in:
@@ -59,7 +59,7 @@ pub enum EOFAction {
|
||||
Reset,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum AtEndOfStream {
|
||||
Not,
|
||||
At,
|
||||
@@ -328,6 +328,12 @@ impl Stream {
|
||||
self.stream_inst.0.borrow_mut().0
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate)
|
||||
fn at_end_of_stream(&mut self) -> bool {
|
||||
self.position_relative_to_end() == AtEndOfStream::At
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate)
|
||||
fn set_past_end_of_stream(&mut self) {
|
||||
|
||||
Reference in New Issue
Block a user