pkstrings: impl fmt::Display for Error
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
ce155c8a40
commit
cc723f7684
1 changed files with 8 additions and 0 deletions
|
@ -91,6 +91,14 @@ pub enum Error {
|
|||
InvalidCharacter,
|
||||
}
|
||||
|
||||
impl fmt::Display for Error {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
match self {
|
||||
Error::InvalidCharacter => write!(f, "Invalid character"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||
pub struct PKString(String);
|
||||
|
||||
|
|
Loading…
Reference in a new issue