From 5b65175710a19daf43c81e52e180fd66ecfe4353 Mon Sep 17 00:00:00 2001 From: Vika Date: Tue, 4 May 2021 23:12:59 +0300 Subject: Clippy lints --- src/database/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/database/mod.rs') 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 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 -- cgit 1.4.1