From dbf193e5f5ef14acbc1a1bd24d92e275c89a9556 Mon Sep 17 00:00:00 2001 From: Schell Carl Scivally Date: Sat, 28 Dec 2024 11:30:42 +1300 Subject: [PATCH] don't prefix crabs on `cargo gpu show` output --- crates/cargo-gpu/src/show.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/crates/cargo-gpu/src/show.rs b/crates/cargo-gpu/src/show.rs index cc9c623..814c057 100644 --- a/crates/cargo-gpu/src/show.rs +++ b/crates/cargo-gpu/src/show.rs @@ -31,14 +31,22 @@ impl Show { /// Entrypoint pub fn run(self) -> anyhow::Result<()> { log::info!("{:?}: ", self.command); + + #[expect( + clippy::print_stdout, + reason = "The output of this command could potentially be used in a script, \ + so we _don't_ want to use `crate::user_output`, as that prefixes a crab." + )] match self.command { Info::CacheDirectory => { - crate::user_output!("{}\n", cache_dir()?.display()); + println!("{}\n", cache_dir()?.display()); } Info::SpirvSource(SpirvSourceDep { shader_crate }) => { let rust_gpu_source = crate::spirv_source::SpirvSource::get_spirv_std_dep_definition(&shader_crate)?; - crate::user_output!("{rust_gpu_source}\n"); + { + println!("{rust_gpu_source}\n"); + } } }