about summary refs log tree commit diff
path: root/tvix/nix-compat/src/nar/writer/async.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-04-10T13·33+0300
committerflokli <flokli@flokli.de>2024-04-13T10·09+0000
commit45cf7ae657086993cedaa7c72b813e319e805484 (patch)
treec4013d2072f37df7563a6dc3b3f4e4c1631cff21 /tvix/nix-compat/src/nar/writer/async.rs
parent742937d55c1e156933b463312b77ca07ebd1d063 (diff)
refactor(tvix/nix-compat): move nar writer to tokio r/7898
There's little reason to keep the nar writer using Async{Read,Write}
traits from futures, while everything else async in tvix (and
nix-compat) uses tokio.

Change-Id: I8cd1efcd0dd5bb76471de997603c7b701a5095de
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11391
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Reviewed-by: Brian Olsen <me@griff.name>
Diffstat (limited to 'tvix/nix-compat/src/nar/writer/async.rs')
-rw-r--r--tvix/nix-compat/src/nar/writer/async.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/nix-compat/src/nar/writer/async.rs b/tvix/nix-compat/src/nar/writer/async.rs
index 11aefab9cb..a2ce68fc3c 100644
--- a/tvix/nix-compat/src/nar/writer/async.rs
+++ b/tvix/nix-compat/src/nar/writer/async.rs
@@ -10,7 +10,7 @@
 //!
 //! ```rust
 //! # futures::executor::block_on(async {
-//! # use futures::io::BufReader;
+//! # use tokio::io::BufReader;
 //! # let some_file: Vec<u8> = vec![0, 1, 2, 3, 4];
 //!
 //! // Output location to write the NAR to.
@@ -31,7 +31,6 @@
 //! ```
 
 use crate::nar::wire;
-use futures_util::{AsyncBufRead, AsyncBufReadExt, AsyncWrite, AsyncWriteExt};
 use std::{
     io::{
         self,
@@ -39,6 +38,7 @@ use std::{
     },
     pin::Pin,
 };
+use tokio::io::{AsyncBufRead, AsyncBufReadExt, AsyncWrite, AsyncWriteExt};
 
 /// Convenience type alias for types implementing [`AsyncWrite`].
 pub type Writer<'a> = dyn AsyncWrite + Unpin + Send + 'a;