mirror of
https://github.com/encounter/rust-ffmpeg-zmwangx.git
synced 2026-07-10 21:18:40 -07:00
fix: use Display instead of std::error::Error::description
This commit is contained in:
+1
-1
@@ -120,7 +120,7 @@ impl From<Error> for io::Error {
|
||||
|
||||
impl fmt::Display for Error {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
f.write_str(error::Error::description(self))
|
||||
f.write_str(&self.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -924,8 +924,8 @@ impl fmt::Display for ParsePixelError {
|
||||
impl error::Error for ParsePixelError {
|
||||
fn description(&self) -> &str {
|
||||
match *self {
|
||||
ParsePixelError::NulError(ref e) => e.description(),
|
||||
ParsePixelError::UnknownFormat => "unknown pixel format",
|
||||
ParsePixelError::NulError(ref e) => e.to_string(),
|
||||
ParsePixelError::UnknownFormat => "unknown pixel format".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user