feat(tvix/castore): Fix build warnings in release mode

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>
This commit is contained in:
Connor Brewster 2024-04-20 11:21:54 -05:00 committed by clbot
parent 18ab59ed70
commit b0bdeb2e89
2 changed files with 2 additions and 0 deletions

View file

@ -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);

View file

@ -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)]