fix(tvix/nix-compat): require async and async,wire for some tests

Makes the following build:
  `cargo test --no-default-features --features async`
  `cargo test --no-default-features --features wire`

Change-Id: I47ba0c944f08895f67ed3b861706ef2e4ba384b3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11739
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Ilan Joselevich 2024-05-30 20:05:02 +03:00
parent 097a15072a
commit c93849a3fc
2 changed files with 3 additions and 1 deletions

View file

@ -97,7 +97,7 @@ const TOK_PAD_PAR: [u8; 24] = *b"\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0)\0\0\0\0\0\0
#[derive(Debug)] #[derive(Debug)]
pub(crate) enum PadPar {} pub(crate) enum PadPar {}
#[cfg(feature = "async")] #[cfg(all(feature = "async", feature = "wire"))]
impl crate::wire::reader::Tag for PadPar { impl crate::wire::reader::Tag for PadPar {
const PATTERN: &'static [u8] = &TOK_PAD_PAR; const PATTERN: &'static [u8] = &TOK_PAD_PAR;

View file

@ -414,6 +414,7 @@ mod tests {
} }
/// Read the trailer immediately if there is no payload. /// Read the trailer immediately if there is no payload.
#[cfg(feature = "async")]
#[tokio::test] #[tokio::test]
async fn read_trailer_immediately() { async fn read_trailer_immediately() {
use crate::nar::wire::PadPar; use crate::nar::wire::PadPar;
@ -431,6 +432,7 @@ mod tests {
} }
/// Read the trailer even if we only read the exact payload size. /// Read the trailer even if we only read the exact payload size.
#[cfg(feature = "async")]
#[tokio::test] #[tokio::test]
async fn read_exact_trailer() { async fn read_exact_trailer() {
use crate::nar::wire::PadPar; use crate::nar::wire::PadPar;