From 366741fe0f5092eec59e74995f8e2f76ee74c73d Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Sat, 20 Mar 2021 00:14:44 -0700 Subject: [PATCH] refactor(mysql): prefer handle_ over recv_ for methods that do not recv from the buffer but only handle what was received --- sqlx-mysql/src/connection/connect.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sqlx-mysql/src/connection/connect.rs b/sqlx-mysql/src/connection/connect.rs index 13c85ec0..d2fc3826 100644 --- a/sqlx-mysql/src/connection/connect.rs +++ b/sqlx-mysql/src/connection/connect.rs @@ -19,7 +19,7 @@ use crate::protocol::{AuthResponse, Capabilities, Handshake, HandshakeResponse}; use crate::{MySqlConnectOptions, MySqlConnection}; impl MySqlConnection { - fn recv_handshake( + fn handle_handshake( &mut self, options: &MySqlConnectOptions, handshake: &Handshake, @@ -56,7 +56,7 @@ impl MySqlConnection { Ok(()) } - fn recv_auth_response( + fn handle_auth_response( &mut self, options: &MySqlConnectOptions, handshake: &mut Handshake, @@ -122,11 +122,11 @@ macro_rules! impl_connect { // immediately the server should emit a packet // we need to handle that and reply with a let mut handshake = read_packet!($(@$blocking)? self_.stream).deserialize()?; - self_.recv_handshake($options, &handshake)?; + self_.handle_handshake($options, &handshake)?; loop { let response = read_packet!($(@$blocking)? self_.stream).deserialize_with(self_.capabilities)?; - if self_.recv_auth_response($options, &mut handshake, response)? { + if self_.handle_auth_response($options, &mut handshake, response)? { // complete, successful authentication break; }