forked from syndicate-lang/preserves
Fix conformance errors
This commit is contained in:
parent
32ebebec34
commit
e02ee00894
|
@ -53,7 +53,18 @@ pub enum ParseError {
|
|||
#[error("Input not conformant with Schema: {0}")]
|
||||
ConformanceError(&'static str),
|
||||
#[error(transparent)]
|
||||
Preserves(#[from] preserves::error::Error),
|
||||
Preserves(preserves::error::Error),
|
||||
}
|
||||
|
||||
impl From<preserves::error::Error> for ParseError {
|
||||
fn from(v: preserves::error::Error) -> Self {
|
||||
match v {
|
||||
preserves::error::Error::Expected(_, _) =>
|
||||
ParseError::ConformanceError("preserves::error::Error::Expected"),
|
||||
_ =>
|
||||
ParseError::Preserves(v),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<io::Error> for ParseError {
|
||||
|
|
Loading…
Reference in New Issue