From 9f210e973834700d14c6c0283ed750ed5b038e8b Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sat, 9 May 2026 23:16:24 +0300 Subject: chore: enable clippy linting --- src/client/mod.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/client') diff --git a/src/client/mod.rs b/src/client/mod.rs index 1e0beded..475a079f 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -231,9 +231,8 @@ fn do_handshake( rows, requested_encoding, }; - protocol::write_message(stream, &hello).map_err(|e| { - ClientError::ConnectionFailed(io::Error::new(io::ErrorKind::Other, e.to_string())) - })?; + protocol::write_message(stream, &hello) + .map_err(|e| ClientError::ConnectionFailed(io::Error::other(e.to_string())))?; // Read Welcome. stream @@ -339,7 +338,7 @@ pub fn run_client() -> io::Result<()> { let rt = tokio::runtime::Builder::new_current_thread() .enable_all() .build() - .map_err(|e| io::Error::new(io::ErrorKind::Other, e))?; + .map_err(io::Error::other)?; let should_quit = Arc::new(AtomicBool::new(false)); @@ -577,8 +576,7 @@ fn server_reader_thread( /// Writes a message to the server stream (blocking). fn write_to_server(stream: &mut UnixStream, msg: &ClientMessage) -> io::Result<()> { - protocol::write_message(stream, msg) - .map_err(|e| io::Error::new(io::ErrorKind::Other, e.to_string())) + protocol::write_message(stream, msg).map_err(|e| io::Error::other(e.to_string())) } // --------------------------------------------------------------------------- -- cgit v1.2.3