Skip to content

Commit

Permalink
delete read_from_replicas method
Browse files Browse the repository at this point in the history
  • Loading branch information
fruscianteee committed Sep 9, 2024
1 parent 99aba5b commit 2f919a0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions redis/src/cluster/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion redis/tests/redis_cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f919a0

Please sign in to comment.