pkstrings: impl StdError for Error
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
88206d84d3
commit
494f20cd22
1 changed files with 3 additions and 0 deletions
|
@ -22,6 +22,7 @@
|
|||
|
||||
use std::convert::TryFrom;
|
||||
use std::fmt;
|
||||
use std::error::Error as StdError;
|
||||
use std::ops::Deref;
|
||||
|
||||
const fn in_range(ord: u8) -> bool {
|
||||
|
@ -111,6 +112,8 @@ pub enum Error {
|
|||
InvalidCharacter(char),
|
||||
}
|
||||
|
||||
impl StdError for Error {}
|
||||
|
||||
impl fmt::Display for Error {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
match self {
|
||||
|
|
Loading…
Reference in a new issue