From 4d3072929e2924a1cb3a54a0c503e407dae6e95d Mon Sep 17 00:00:00 2001 From: naskya Date: Fri, 10 May 2024 06:59:05 +0900 Subject: [PATCH] chore (backend-rs): update doctest comment --- packages/backend-rs/src/database/cache.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/backend-rs/src/database/cache.rs b/packages/backend-rs/src/database/cache.rs index 5b29de46b2..ba2910f254 100644 --- a/packages/backend-rs/src/database/cache.rs +++ b/packages/backend-rs/src/database/cache.rs @@ -49,7 +49,7 @@ fn wildcard(category: Category) -> String { /// ## Example /// /// ``` -/// use backend_rs::database::cache; +/// # use backend_rs::database::cache; /// let key = "apple"; /// let data = "I want to cache this string".to_string(); /// @@ -85,8 +85,7 @@ pub fn set Deserialize<'a> + Serialize>( /// ## Example /// /// ``` -/// use backend_rs::database::cache; -/// +/// # use backend_rs::database::cache; /// let key = "banana"; /// let data = "I want to cache this string".to_string(); /// @@ -121,20 +120,19 @@ pub fn get Deserialize<'a> + Serialize>(key: &str) -> Result("foo").unwrap(); +/// let cached_value = cache::get::("foo").unwrap(); /// assert!(cached_value.is_none()); /// ``` pub fn delete(key: &str) -> Result<(), Error> {