(&self, f: &mut fmt::Formatter)
| 44 | |
| 45 | impl fmt::Display for Error { |
| 46 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
| 47 | match *self { |
| 48 | Error::Syntax(ref err) => err.fmt(f), |
| 49 | Error::CompiledTooBig(limit) => { |
| 50 | write!(f, "Compiled regex exceeds size limit of {} bytes.", |
| 51 | limit) |
| 52 | } |
| 53 | Error::__Nonexhaustive => unreachable!(), |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | // We implement our own Debug implementation so that we show nicer syntax |