From 494f20cd2204ecc03a512a06bc03b5c3af9a65f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Mon, 15 Nov 2021 15:25:58 +0100 Subject: [PATCH] pkstrings: impl StdError for Error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- pkstrings/src/pkstring.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkstrings/src/pkstring.rs b/pkstrings/src/pkstring.rs index f663561..15af130 100644 --- a/pkstrings/src/pkstring.rs +++ b/pkstrings/src/pkstring.rs @@ -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 {