From 28866fdf08f927a0cde1280bcf16effd9cb58396 Mon Sep 17 00:00:00 2001 From: Peter Heiss Date: Sun, 24 Sep 2023 16:09:01 +0200 Subject: [PATCH] rename file for mutex --- src/redis/mod.rs | 4 ++-- src/redis/{lock.rs => mutex.rs} | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) rename src/redis/{lock.rs => mutex.rs} (99%) diff --git a/src/redis/mod.rs b/src/redis/mod.rs index 63f7b08..497cd3b 100644 --- a/src/redis/mod.rs +++ b/src/redis/mod.rs @@ -42,7 +42,7 @@ mod generic; mod helper; mod integer; mod list; -mod lock; +mod mutex; mod string; pub(crate) use helper::apply_operator; @@ -54,5 +54,5 @@ pub use integer::{ Tu32 as Du32, Tu64 as Du64, Tu8 as Du8, Tusize as Dusize, }; pub use list::{List, ListCache, ListIter}; -pub use lock::{Guard, LockError, Mutex}; +pub use mutex::{Guard, LockError, Mutex}; pub use string::TString as DString; diff --git a/src/redis/lock.rs b/src/redis/mutex.rs similarity index 99% rename from src/redis/lock.rs rename to src/redis/mutex.rs index cf1a26a..0434186 100644 --- a/src/redis/lock.rs +++ b/src/redis/mutex.rs @@ -1,7 +1,6 @@ use crate::redis::Generic; use serde::de::DeserializeOwned; use serde::Serialize; -use std::fmt::Display; use std::ops::{Deref, DerefMut}; use thiserror::Error; @@ -335,7 +334,7 @@ where impl Deref for Guard<'_, T> where - T: DeserializeOwned + Serialize + Display, + T: DeserializeOwned + Serialize, { type Target = Generic; @@ -347,7 +346,7 @@ where impl DerefMut for Guard<'_, T> where - T: DeserializeOwned + Serialize + Display, + T: DeserializeOwned + Serialize, { fn deref_mut(&mut self) -> &mut Self::Target { // Safety: The very existence of this Guard guarantees that we have exclusive access to the data.