From 54914782c7632e041919746e80d3f802f6601a63 Mon Sep 17 00:00:00 2001 From: Vika Date: Wed, 23 Mar 2022 05:01:14 +0300 Subject: Make the settings in the database a strong type --- src/database/memory.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/database/memory.rs') diff --git a/src/database/memory.rs b/src/database/memory.rs index df142d3..5e2ad52 100644 --- a/src/database/memory.rs +++ b/src/database/memory.rs @@ -6,7 +6,7 @@ use tokio::sync::RwLock; use futures_util::FutureExt; use serde_json::json; -use crate::database::{Storage, Result, StorageError, ErrorKind, MicropubChannel}; +use crate::database::{Storage, Result, StorageError, ErrorKind, MicropubChannel, Settings}; #[derive(Clone, Debug)] pub struct MemoryStorage { @@ -177,12 +177,12 @@ impl Storage for MemoryStorage { } #[allow(unused_variables)] - async fn get_setting(&self, setting: &'_ str, user: &'_ str) -> Result { + async fn get_setting(&self, setting: Settings, user: &'_ str) -> Result { todo!() } #[allow(unused_variables)] - async fn set_setting(&self, setting: &'_ str, user: &'_ str, value: &'_ str) -> Result<()> { + async fn set_setting(&self, setting: Settings, user: &'_ str, value: &'_ str) -> Result<()> { todo!() } } -- cgit 1.4.1