From 49164a733cfb57a1e59f2f6cd50366e1863b697b Mon Sep 17 00:00:00 2001 From: Mohammad Dashti Date: Fri, 6 Oct 2023 15:13:29 -0700 Subject: [PATCH] Revert "Fixed clippy issues on CI." This reverts commit a9fa6ba1894ff94b3e1c09e3e8c498df76a7da11. --- src/messages.rs | 4 ++-- src/mirrors.rs | 4 ++-- src/pool.rs | 2 +- src/query_router.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/messages.rs b/src/messages.rs index 86036a9..3b0e4ca 100644 --- a/src/messages.rs +++ b/src/messages.rs @@ -279,7 +279,7 @@ where { let password = md5_hash_password(user, password, salt); - let mut message = BytesMut::with_capacity(password.len() + 5); + let mut message = BytesMut::with_capacity(password.len() as usize + 5); message.put_u8(b'p'); message.put_i32(password.len() as i32 + 4); @@ -293,7 +293,7 @@ where S: tokio::io::AsyncWrite + std::marker::Unpin, { let password = md5_hash_second_pass(hash, salt); - let mut message = BytesMut::with_capacity(password.len() + 5); + let mut message = BytesMut::with_capacity(password.len() as usize + 5); message.put_u8(b'p'); message.put_i32(password.len() as i32 + 4); diff --git a/src/mirrors.rs b/src/mirrors.rs index f704a8c..7d325a1 100644 --- a/src/mirrors.rs +++ b/src/mirrors.rs @@ -137,8 +137,8 @@ impl MirroringManager { bytes_rx, disconnect_rx: exit_rx, }; - exit_senders.push(exit_tx); - byte_senders.push(bytes_tx); + exit_senders.push(exit_tx.clone()); + byte_senders.push(bytes_tx.clone()); client.start(); }); diff --git a/src/pool.rs b/src/pool.rs index 736dc1a..bc04c5c 100644 --- a/src/pool.rs +++ b/src/pool.rs @@ -1041,7 +1041,7 @@ impl ServerPool { ) -> ServerPool { ServerPool { address, - user, + user: user.clone(), database: database.to_string(), client_server_map, auth_hash, diff --git a/src/query_router.rs b/src/query_router.rs index 8b451dd..3357fce 100644 --- a/src/query_router.rs +++ b/src/query_router.rs @@ -1476,7 +1476,7 @@ mod test { }; let mut qr = QueryRouter::new(); - qr.update_pool_settings(pool_settings); + qr.update_pool_settings(pool_settings.clone()); // Shard should start out unset assert_eq!(qr.active_shard, None);