about summary refs log tree commit diff
diff options
context:
space:
mode:
authorConnor Brewster <cbrewster@hey.com>2024-04-20T16·21-0500
committerclbot <clbot@tvl.fyi>2024-04-20T16·47+0000
commitb0bdeb2e895a4094247cf16fe41566b9f1b79f43 (patch)
treeec5a3f8f078d991f5ecc126d958f87dc6355eb39
parent18ab59ed70c7d86e0d7d36379f5cbb81e82dac43 (diff)
feat(tvix/castore): Fix build warnings in release mode r/7985
Fixes some build warnings that only happen when building in release mode
which disables `debug_assertions`.

Change-Id: I554d5fce7c869c23cf4aa93179f0ee9f7f7c834e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11490
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
Autosubmit: Connor Brewster <cbrewster@hey.com>
Reviewed-by: flokli <flokli@flokli.de>
-rw-r--r--tvix/castore/src/directoryservice/closure_validator.rs1
-rw-r--r--tvix/castore/src/import/mod.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/tvix/castore/src/directoryservice/closure_validator.rs b/tvix/castore/src/directoryservice/closure_validator.rs
index 461fc907bdad..183928a86fad 100644
--- a/tvix/castore/src/directoryservice/closure_validator.rs
+++ b/tvix/castore/src/directoryservice/closure_validator.rs
@@ -136,6 +136,7 @@ impl ClosureValidator {
         let mut visited_directory_count = 0;
         #[cfg(debug_assertions)]
         let mut visited_directory_ixs = HashSet::new();
+        #[cfg_attr(not(debug_assertions), allow(unused))]
         while let Some(directory_ix) = traversal.next(&self.graph) {
             #[cfg(debug_assertions)]
             visited_directory_ixs.insert(directory_ix);
diff --git a/tvix/castore/src/import/mod.rs b/tvix/castore/src/import/mod.rs
index 72d55e13e08e..7e60cf44d903 100644
--- a/tvix/castore/src/import/mod.rs
+++ b/tvix/castore/src/import/mod.rs
@@ -152,6 +152,7 @@ where
     // if there were directories uploaded, make sure we flush the putter, so
     // they're all persisted to the backend.
     if let Some(mut directory_putter) = maybe_directory_putter {
+        #[cfg_attr(not(debug_assertions), allow(unused))]
         let root_directory_digest = directory_putter.close().await?;
 
         #[cfg(debug_assertions)]