pkstrings: impl StdError for Error

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2021-11-15 15:25:58 +01:00
parent 88206d84d3
commit 494f20cd22
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -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 {