Skip to content

Commit

Permalink
Merge pull request #1143 from Lorak-mmk/refiller-ks-clone
Browse files Browse the repository at this point in the history
refiller: Remove unnecessary clone
  • Loading branch information
wprzytula authored Dec 7, 2024
2 parents 92fdd71 + 4eb434f commit 4d80aa1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scylla/src/transport/connection_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ impl PoolRefiller {
req = use_keyspace_request_receiver.recv() => {
if let Some(req) = req {
debug!("[{}] Requested keyspace change: {}", self.endpoint_description(), req.keyspace_name.as_str());
self.use_keyspace(&req.keyspace_name, req.response_sender);
self.use_keyspace(req.keyspace_name, req.response_sender);
} else {
// The keyspace request channel is dropped.
// This means that the corresponding pool is dropped.
Expand Down Expand Up @@ -1077,13 +1077,12 @@ impl PoolRefiller {
// have their keyspace set.
fn use_keyspace(
&mut self,
keyspace_name: &VerifiedKeyspaceName,
keyspace_name: VerifiedKeyspaceName,
response_sender: tokio::sync::oneshot::Sender<Result<(), QueryError>>,
) {
self.current_keyspace = Some(keyspace_name.clone());

let mut conns = self.conns.clone();
let keyspace_name = keyspace_name.clone();
let address = self.endpoint.read().unwrap().address();
let connect_timeout = self.pool_config.connection_config.connect_timeout;

Expand Down

0 comments on commit 4d80aa1

Please sign in to comment.