diff --git a/capnp-rpc/examples/calculator/client.rs b/capnp-rpc/examples/calculator/client.rs index d608dcb9e..48b57530f 100644 --- a/capnp-rpc/examples/calculator/client.rs +++ b/capnp-rpc/examples/calculator/client.rs @@ -67,8 +67,8 @@ async fn try_main(args: Vec) -> Result<(), Box> { let (reader, writer) = tokio_util::compat::TokioAsyncReadCompatExt::compat(stream).split(); let network = Box::new(twoparty::VatNetwork::new( - reader, - writer, + futures::io::BufReader::new(reader), + futures::io::BufWriter::new(writer), rpc_twoparty_capnp::Side::Client, Default::default(), )); diff --git a/capnp-rpc/examples/calculator/server.rs b/capnp-rpc/examples/calculator/server.rs index fb1a973c6..1ec90e61f 100644 --- a/capnp-rpc/examples/calculator/server.rs +++ b/capnp-rpc/examples/calculator/server.rs @@ -225,8 +225,8 @@ pub async fn main() -> Result<(), Box> { let (reader, writer) = tokio_util::compat::TokioAsyncReadCompatExt::compat(stream).split(); let network = twoparty::VatNetwork::new( - reader, - writer, + futures::io::BufReader::new(reader), + futures::io::BufWriter::new(writer), rpc_twoparty_capnp::Side::Server, Default::default(), ); diff --git a/capnp-rpc/examples/hello-world/client.rs b/capnp-rpc/examples/hello-world/client.rs index 5259d0906..6f4ea47f2 100644 --- a/capnp-rpc/examples/hello-world/client.rs +++ b/capnp-rpc/examples/hello-world/client.rs @@ -46,8 +46,8 @@ pub async fn main() -> Result<(), Box> { let (reader, writer) = tokio_util::compat::TokioAsyncReadCompatExt::compat(stream).split(); let rpc_network = Box::new(twoparty::VatNetwork::new( - reader, - writer, + futures::io::BufReader::new(reader), + futures::io::BufWriter::new(writer), rpc_twoparty_capnp::Side::Client, Default::default(), )); diff --git a/capnp-rpc/examples/hello-world/server.rs b/capnp-rpc/examples/hello-world/server.rs index 2eff13aa7..e7a59a445 100644 --- a/capnp-rpc/examples/hello-world/server.rs +++ b/capnp-rpc/examples/hello-world/server.rs @@ -67,8 +67,8 @@ pub async fn main() -> Result<(), Box> { let (reader, writer) = tokio_util::compat::TokioAsyncReadCompatExt::compat(stream).split(); let network = twoparty::VatNetwork::new( - reader, - writer, + futures::io::BufReader::new(reader), + futures::io::BufWriter::new(writer), rpc_twoparty_capnp::Side::Server, Default::default(), ); diff --git a/capnp-rpc/examples/pubsub/client.rs b/capnp-rpc/examples/pubsub/client.rs index 9ad0da313..1dab03546 100644 --- a/capnp-rpc/examples/pubsub/client.rs +++ b/capnp-rpc/examples/pubsub/client.rs @@ -61,8 +61,8 @@ pub async fn main() -> Result<(), Box> { let (reader, writer) = tokio_util::compat::TokioAsyncReadCompatExt::compat(stream).split(); let rpc_network = Box::new(twoparty::VatNetwork::new( - reader, - writer, + futures::io::BufReader::new(reader), + futures::io::BufWriter::new(writer), rpc_twoparty_capnp::Side::Client, Default::default(), )); diff --git a/capnp-rpc/examples/pubsub/server.rs b/capnp-rpc/examples/pubsub/server.rs index f037c576a..0e40fe709 100644 --- a/capnp-rpc/examples/pubsub/server.rs +++ b/capnp-rpc/examples/pubsub/server.rs @@ -138,8 +138,8 @@ pub async fn main() -> Result<(), Box> { let (reader, writer) = tokio_util::compat::TokioAsyncReadCompatExt::compat(stream).split(); let network = twoparty::VatNetwork::new( - reader, - writer, + futures::io::BufReader::new(reader), + futures::io::BufWriter::new(writer), rpc_twoparty_capnp::Side::Server, Default::default(), );