]> git.lizzy.rs Git - rust.git/blobdiff - src/libserialize/json.rs
Rollup merge of #69732 - GuillaumeGomez:cleanup-e0382-e0384, r=Dylan-DPC
[rust.git] / src / libserialize / json.rs
index b1ad0e853a3d52097f3358527acb7189647c92aa..1f9d43cb93043fb20be7a4d9c756cd5413196fa5 100644 (file)
@@ -345,11 +345,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
     }
 }
 
-impl std::error::Error for DecoderError {
-    fn description(&self) -> &str {
-        "decoder error"
-    }
-}
+impl std::error::Error for DecoderError {}
 
 impl fmt::Display for EncoderError {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
@@ -358,11 +354,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
     }
 }
 
-impl std::error::Error for EncoderError {
-    fn description(&self) -> &str {
-        "encoder error"
-    }
-}
+impl std::error::Error for EncoderError {}
 
 impl From<fmt::Error> for EncoderError {
     /// Converts a [`fmt::Error`] into `EncoderError`