diff --git a/redis/src/cluster/config.rs b/redis/src/cluster/config.rs index 3fa9a70..cb7e042 100644 --- a/redis/src/cluster/config.rs +++ b/redis/src/cluster/config.rs @@ -118,13 +118,6 @@ impl Config { read_from_replicas: false, } } - - /// Enables reading from replicas for the Redis cluster. - /// - /// This method sets `read_from_replicas` to `true`. - pub fn read_from_replicas(&mut self) { - self.read_from_replicas = true; - } } impl Default for Config { diff --git a/redis/tests/redis_cluster.rs b/redis/tests/redis_cluster.rs index 98c2065..f200edf 100644 --- a/redis/tests/redis_cluster.rs +++ b/redis/tests/redis_cluster.rs @@ -56,7 +56,7 @@ async fn test_pipeline() { async fn test_read_from_replicas() { use deadpool_redis::redis::pipe; let mut cfg = Config::from_env(); - let _ = cfg.redis_cluster.read_from_replicas(); + cfg.redis_cluster.read_from_replicas = true; assert_eq!(cfg.redis_cluster.read_from_replicas, true); let pool = cfg