Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refiller: Remove unnecessary clone #1143

Merged
merged 1 commit into from
Dec 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading