about summary refs log tree commit diff
path: root/src/database
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2021-05-05 12:53:11 +0300
committerVika <vika@fireburn.ru>2021-05-05 12:53:11 +0300
commit445873540edd1c4b21dc1c5039a489666cac1f30 (patch)
tree851645c6a5757f0efe67279d486fd19f981ef77e /src/database
parente6a7f428b04191cfc79174758804ad9b82391aa3 (diff)
downloadkittybox-445873540edd1c4b21dc1c5039a489666cac1f30.tar.zst
Made some StorageError fields private and added getters instead
Diffstat (limited to 'src/database')
-rw-r--r--src/database/mod.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/database/mod.rs b/src/database/mod.rs
index f0a1e4b..cdd5c43 100644
--- a/src/database/mod.rs
+++ b/src/database/mod.rs
@@ -30,9 +30,9 @@ pub enum ErrorKind {
 
 #[derive(Debug)]
 pub struct StorageError {
-    pub msg: String,
+    msg: String,
     source: Option<Box<dyn std::error::Error>>,
-    pub kind: ErrorKind
+    kind: ErrorKind
 }
 unsafe impl Send for StorageError {}
 unsafe impl Sync for StorageError {}
@@ -99,6 +99,9 @@ impl StorageError {
     pub fn kind(&self) -> ErrorKind {
         self.kind
     }
+    pub fn msg(&self) -> &str {
+        &self.msg
+    }
 }