lib/scanner: add UnexpectedEOF error variant

This commit is contained in:
Paul Stemmet 2021-06-05 17:01:38 +00:00
parent 7b3b773b79
commit 37cc45803a
Signed by: Paul Stemmet
GPG key ID: EDEA539F594E7E75

View file

@ -2,7 +2,7 @@ use std::fmt;
pub type ScanResult<T> = std::result::Result<T, ScanError>;
#[derive(Debug)]
#[derive(Debug, PartialEq, Eq)]
pub enum ScanError
{
/// Directive was not either YAML or TAG
@ -18,6 +18,9 @@ pub enum ScanError
/// A directive major or minor digit was not 0..=9
InvalidVersion,
/// Got end of stream while parsing a token
UnexpectedEOF,
}
impl fmt::Display for ScanError