about summary refs log tree commit diff
path: root/tvix/nix-compat/src/nar/writer/async.rs
diff options
context:
space:
mode:
authoredef <edef@edef.eu>2023-10-27T16·05+0000
committeredef <edef@edef.eu>2023-10-27T17·07+0000
commit2fce356ce083bd8511421499ae9eeab77f358222 (patch)
treed49f79b96715f519a5a633dfac14405182227503 /tvix/nix-compat/src/nar/writer/async.rs
parent9253bf6632b17e68417b0cde29609cafa6225cee (diff)
fix(nix-compat/nar/writer): `use ByteSlice` closer to call site r/6898
Otherwise, it'll generate unused import warnings in release mode.

Change-Id: I0399d2617a8a8b973a2b8c18f4a0a613d70c48f5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9864
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/nix-compat/src/nar/writer/async.rs')
-rw-r--r--tvix/nix-compat/src/nar/writer/async.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/nix-compat/src/nar/writer/async.rs b/tvix/nix-compat/src/nar/writer/async.rs
index dd5c72ac8913..11aefab9cba7 100644
--- a/tvix/nix-compat/src/nar/writer/async.rs
+++ b/tvix/nix-compat/src/nar/writer/async.rs
@@ -31,7 +31,6 @@
 //! ```
 
 use crate::nar::wire;
-use bstr::ByteSlice;
 use futures_util::{AsyncBufRead, AsyncBufReadExt, AsyncWrite, AsyncWriteExt};
 use std::{
     io::{
@@ -197,6 +196,7 @@ impl<'a, 'w> Directory<'a, 'w> {
             Some(ref mut _prev_name) => {
                 #[cfg(debug_assertions)]
                 {
+                    use bstr::ByteSlice;
                     assert!(
                         &**_prev_name < name,
                         "misordered names: {:?} >= {:?}",