diff options
author | Vika <vika@fireburn.ru> | 2021-05-04 23:12:59 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2021-05-04 23:12:59 +0300 |
commit | 5b65175710a19daf43c81e52e180fd66ecfe4353 (patch) | |
tree | 40527b7b61a425926fb0b3a34ec782bda4b8d79d /src/database/mod.rs | |
parent | 1a78c48bd86ff72cc9c7020e69ec9a77302a2f8b (diff) | |
download | kittybox-5b65175710a19daf43c81e52e180fd66ecfe4353.tar.zst |
Clippy lints
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 |