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