diff options
-rw-r--r-- | tvix/build/src/bin/tvix-build.rs | 4 | ||||
-rw-r--r-- | tvix/cli/src/main.rs | 2 | ||||
-rw-r--r-- | tvix/tracing/src/lib.rs | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/tvix/build/src/bin/tvix-build.rs b/tvix/build/src/bin/tvix-build.rs index cb92f333effb..ffdbc3ca4148 100644 --- a/tvix/build/src/bin/tvix-build.rs +++ b/tvix/build/src/bin/tvix-build.rs @@ -50,7 +50,9 @@ enum Commands { async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> { let cli = Cli::parse(); - let _ = tvix_tracing::TracingBuilder::default().enable_progressbar(); + tvix_tracing::TracingBuilder::default() + .enable_progressbar() + .build()?; match cli.command { Commands::Daemon { diff --git a/tvix/cli/src/main.rs b/tvix/cli/src/main.rs index 338486195e3d..e16127692211 100644 --- a/tvix/cli/src/main.rs +++ b/tvix/cli/src/main.rs @@ -57,7 +57,7 @@ fn lint(code: &str, path: Option<PathBuf>, args: &Args) -> bool { fn main() { let args = Args::parse(); - let _ = tvix_tracing::TracingBuilder::default() + tvix_tracing::TracingBuilder::default() .enable_progressbar() .build() .expect("unable to set up tracing subscriber"); diff --git a/tvix/tracing/src/lib.rs b/tvix/tracing/src/lib.rs index 41f294cf499a..1305778a3d9a 100644 --- a/tvix/tracing/src/lib.rs +++ b/tvix/tracing/src/lib.rs @@ -145,6 +145,7 @@ impl TracingHandle { } } +#[must_use = "Don't forget to call build() to enable tracing."] #[derive(Default)] pub struct TracingBuilder { progess_bar: bool, |