chore: Fix error by cfg-guarding the declaration of filename and not just its use

This commit is contained in:
Chris Hennick 2024-05-02 18:32:20 -07:00
parent 63793a32ff
commit 28c2eb59e7
No known key found for this signature in database
GPG key ID: DA47AABA4961C509

View file

@ -8,10 +8,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
if args.len() < 2 { if args.len() < 2 {
return Err(format!("Usage: {} <filename>", args[0]).into()); return Err(format!("Usage: {} <filename>", args[0]).into());
} }
let filename = &*args[1];
#[cfg(feature = "_deflate-any")] #[cfg(feature = "_deflate-any")]
{ {
let filename = &*args[1];
doit(filename)?; doit(filename)?;
} }
Ok(()) Ok(())