summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorMatthieuCoder <matthieu@matthieu-dev.xyz>2023-01-04 19:36:27 +0400
committerMatthieuCoder <matthieu@matthieu-dev.xyz>2023-01-04 19:36:27 +0400
commit408b524ba7d7c2b8b34131054d9f2498cc0d62ff (patch)
treee30c03052d3bd2949fcfb1ce0a265efbca9ae30d /libs
parenteb2dc6ac0272d6a95fa22c1f014100a625c31fed (diff)
fix clippy warnings
Diffstat (limited to 'libs')
-rw-r--r--libs/shared/src/config.rs2
-rw-r--r--libs/shared/src/redis.rs9
2 files changed, 2 insertions, 9 deletions
diff --git a/libs/shared/src/config.rs b/libs/shared/src/config.rs
index 4387dfb..ab584a2 100644
--- a/libs/shared/src/config.rs
+++ b/libs/shared/src/config.rs
@@ -13,7 +13,7 @@ pub struct Settings<T: Clone + DeserializeOwned + Default> {
pub redis: crate::redis::RedisConfiguration,
}
-impl<'de, T: Clone + DeserializeOwned + Default> Settings<T>
+impl<T: Clone + DeserializeOwned + Default> Settings<T>
{
pub fn new(service_name: &str) -> Result<Settings<T>, GenericError> {
let mut builder = Config::builder();
diff --git a/libs/shared/src/redis.rs b/libs/shared/src/redis.rs
index 5753fb6..a623c2f 100644
--- a/libs/shared/src/redis.rs
+++ b/libs/shared/src/redis.rs
@@ -7,15 +7,8 @@ pub struct RedisConfiguration {
pub url: String,
}
-// Allows the configuration to directly create a nats connection
-impl Into<Client> for RedisConfiguration {
- fn into(self) -> Client {
- redis::Client::open(self.url).unwrap()
- }
-}
-
impl From<RedisConfiguration>
- for Pin<Box<dyn Future<Output = anyhow::Result<MultiplexedConnection>>>>
+ for Pin<Box<dyn Future<Output = anyhow::Result<MultiplexedConnection>> + Send>>
{
fn from(value: RedisConfiguration) -> Self {
Box::pin(async move {