diff options
Diffstat (limited to 'src/database/mod.rs')
-rw-r--r-- | src/database/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/database/mod.rs b/src/database/mod.rs index 1708cff..f0a1e4b 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -22,7 +22,7 @@ pub struct MicropubChannel { pub enum ErrorKind { Backend, PermissionDenied, - JSONParsing, + JsonParsing, NotFound, BadRequest, Other @@ -62,7 +62,7 @@ impl From<serde_json::Error> for StorageError { Self { msg: format!("{}", err), source: Some(Box::new(err)), - kind: ErrorKind::JSONParsing + kind: ErrorKind::JsonParsing } } } @@ -70,7 +70,7 @@ impl std::fmt::Display for StorageError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match match self.kind { ErrorKind::Backend => write!(f, "backend error: "), - ErrorKind::JSONParsing => write!(f, "error while parsing JSON: "), + ErrorKind::JsonParsing => write!(f, "error while parsing JSON: "), ErrorKind::PermissionDenied => write!(f, "permission denied: "), ErrorKind::NotFound => write!(f, "not found: "), ErrorKind::BadRequest => write!(f, "bad request: "), @@ -89,7 +89,7 @@ impl serde::Serialize for StorageError { impl StorageError { /// Create a new StorageError of an ErrorKind with a message. fn new(kind: ErrorKind, msg: &str) -> Self { - return StorageError { + StorageError { msg: msg.to_string(), source: None, kind |