From 12a4906117349fa518e4be5550bd8901941abcf0 Mon Sep 17 00:00:00 2001 From: Vika Date: Tue, 4 May 2021 21:06:24 +0300 Subject: Implemented MemoryStorage::update_post() --- src/database/mod.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/database/mod.rs') diff --git a/src/database/mod.rs b/src/database/mod.rs index 6abe72c..82bbea5 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -24,6 +24,7 @@ pub enum ErrorKind { PermissionDenied, JSONParsing, NotFound, + BadRequest, Other } @@ -56,6 +57,7 @@ impl std::fmt::Display for StorageError { 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: "), ErrorKind::Other => write!(f, "generic storage layer error: ") } { Ok(_) => write!(f, "{}", self.msg), -- cgit 1.4.1