change wrong at_end_of_stream value 'end' to 'at' (#479)

This commit is contained in:
Mark Thom
2020-05-10 13:24:45 -06:00
parent ea5771c442
commit 67fce58708

View File

@@ -62,7 +62,7 @@ pub enum EOFAction {
#[derive(Debug)]
pub enum AtEndOfStream {
Not,
End,
At,
Past
}
@@ -73,7 +73,7 @@ impl AtEndOfStream {
match self {
AtEndOfStream::Not => "not",
AtEndOfStream::Past => "past",
AtEndOfStream::End => "end",
AtEndOfStream::At => "at",
}
}
}
@@ -348,7 +348,7 @@ impl Stream {
if let Ok(position) = file.seek(SeekFrom::Current(0)) {
return match position.cmp(&metadata.len()) {
Ordering::Equal => {
AtEndOfStream::End
AtEndOfStream::At
}
Ordering::Less => {
AtEndOfStream::Not