mirror of
https://github.com/iluvcapra/bwavfile.git
synced 2025-12-31 08:50:44 +00:00
implement std::error::Error for Error
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use std::io;
|
||||
use std::{fmt::{Debug,Display}, io};
|
||||
use std::error::Error as StdError;
|
||||
use super::fourcc::FourCC;
|
||||
|
||||
use uuid;
|
||||
@@ -43,6 +44,14 @@ pub enum Error {
|
||||
|
||||
}
|
||||
|
||||
impl StdError for Error {}
|
||||
|
||||
impl Display for Error {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
Debug::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
impl From<io::Error> for Error {
|
||||
fn from(error: io::Error) -> Error {
|
||||
|
||||
Reference in New Issue
Block a user