about summary refs log tree commit diff
path: root/tvix/eval/src/vm/generators.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-05-26T18·20+0200
committerflokli <flokli@flokli.de>2024-05-30T16·18+0000
commit543c103903ad10427a8ccbfbd4fa0520baad1c3e (patch)
treecfa2ee0c1afc6efc69e15f1c537f2b2a96da35af /tvix/eval/src/vm/generators.rs
parente8324073eb85f1531e07ef5140db48d2a0d74239 (diff)
fix(tvix/eval/vm/generators): allow unused rq_{path_exists,read_dir} r/8179
These VM requests are only emitted by code gated behind the impure feature.

To prevent warning from popping up when building without default
features, allow these to be unused if `impure` is not enabled.

Change-Id: Id871a5215e9a0f09aa78edecdd111369ee7ffe34
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11722
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/eval/src/vm/generators.rs')
-rw-r--r--tvix/eval/src/vm/generators.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/tvix/eval/src/vm/generators.rs b/tvix/eval/src/vm/generators.rs
index 79de6886923a..dbf7703bf002 100644
--- a/tvix/eval/src/vm/generators.rs
+++ b/tvix/eval/src/vm/generators.rs
@@ -745,6 +745,7 @@ pub async fn request_open_file(co: &GenCo, path: PathBuf) -> Box<dyn std::io::Re
     }
 }
 
+#[cfg_attr(not(feature = "impure"), allow(unused))]
 pub(crate) async fn request_path_exists(co: &GenCo, path: PathBuf) -> Value {
     match co.yield_(VMRequest::PathExists(path)).await {
         VMResponse::Value(value) => value,
@@ -755,6 +756,7 @@ pub(crate) async fn request_path_exists(co: &GenCo, path: PathBuf) -> Value {
     }
 }
 
+#[cfg_attr(not(feature = "impure"), allow(unused))]
 pub(crate) async fn request_read_dir(co: &GenCo, path: PathBuf) -> Vec<(bytes::Bytes, FileType)> {
     match co.yield_(VMRequest::ReadDir(path)).await {
         VMResponse::Directory(dir) => dir,