1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
extern crate percent_encoding; extern crate textwrap; mod utils; use std::fmt::{self, Debug, Formatter}; pub use utils::*; pub enum TextError { UnescapeError(usize, Box<str>), } impl Debug for TextError { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { match self { TextError::UnescapeError(p, c) => write!(f, "UnescapeError: Fail to unescape {} at position {}", c, p), } } }