From fe79b4dae066388f87e88c752172b0fb9dfe1a9b Mon Sep 17 00:00:00 2001 From: Paolo Barbolini Date: Tue, 8 Aug 2023 12:07:29 +0200 Subject: [PATCH] Remove `BufWriter` --- async-nats/src/connector.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/async-nats/src/connector.rs b/async-nats/src/connector.rs index e08326ef7..d2a16dc4f 100644 --- a/async-nats/src/connector.rs +++ b/async-nats/src/connector.rs @@ -40,7 +40,6 @@ use std::io; use std::path::PathBuf; use std::sync::Arc; use std::time::Duration; -use tokio::io::BufWriter; use tokio::io::ErrorKind; use tokio::net::TcpStream; use tokio::time::sleep; @@ -296,7 +295,7 @@ impl Connector { tcp_stream.set_nodelay(true)?; let mut connection = Connection::new( - Box::new(BufWriter::new(tcp_stream)), + Box::new(tcp_stream), self.options.read_buffer_capacity.into(), );