diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-09 23:16:24 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-09 23:16:24 +0300 |
| commit | 9f210e973834700d14c6c0283ed750ed5b038e8b (patch) | |
| tree | cd8c75755c59fdc47bf71ca6dc34e49ab0258ae6 /src/client | |
| parent | 3a9888cd564dc45d23a7bdd0dba29a6ff1ef48a1 (diff) | |
chore: enable clippy linting
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/mod.rs | 10 |
1 files changed, 4 insertions, 6 deletions
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())) } // --------------------------------------------------------------------------- |
