blob: f251167e11533e83db69e6be0a1623c1a897f5f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
use std::{error, fmt, result};
pub type Result<T> = result::Result<T, Error>;
#[derive(Debug, PartialEq, Eq)]
pub enum Error {
UnclosedString,
}
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
Error::UnclosedString => write!(f, "unclosed string literal"),
}
}
}
impl error::Error for Error {}
|