We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94fb6c7 commit ab07d13Copy full SHA for ab07d13
src/error.rs
@@ -1,3 +1,5 @@
1
+use std::fmt;
2
+
3
#[derive(Debug, PartialEq, Eq, Clone)]
4
pub enum Error {
5
JSON(String),
@@ -22,3 +24,11 @@ impl_error!(serde_json::Error, JSON);
22
24
impl_error!(std::str::Utf8Error, Utf8);
23
25
impl_error!(std::io::Error, IOError);
26
impl_error!(pyo3::prelude::PyErr, PyErr);
27
28
+impl fmt::Display for Error {
29
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
30
+ write!(f, "{:?}", self)
31
+ }
32
+}
33
34
+impl std::error::Error for Error {}
0 commit comments