diff options
author | Vika <vika@fireburn.ru> | 2024-08-26 14:08:07 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2024-08-26 14:36:57 +0300 |
commit | c79e950ca22c7a957c11e510700664327b042115 (patch) | |
tree | 1387e5931dd08cea0d21b2770964e169d7043905 /templates | |
parent | 1a4a9b85b9bf9ae8650a2cd68416476c7d1770b3 (diff) | |
download | kittybox-c79e950ca22c7a957c11e510700664327b042115.tar.zst |
Appease most clippy warnings
The warnings only remain in places where I need them to remain, because I either need a reminder to implement something, or I need to refactor and simplify the code in question.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/build.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/build.rs b/templates/build.rs index bdf99fa..ac77059 100644 --- a/templates/build.rs +++ b/templates/build.rs @@ -22,7 +22,7 @@ fn main() -> Result<(), std::io::Error> { println!("cargo:rerun-if-changed=assets/"); let assets_path = std::path::Path::new("assets"); - let mut assets = WalkDir::new(&assets_path) + let mut assets = WalkDir::new(assets_path) .into_iter(); while let Some(Ok(entry)) = assets.next() { if entry.file_type().is_dir() { @@ -64,19 +64,19 @@ fn main() -> Result<(), std::io::Error> { .write(true) .open(&gzip_path)?; - let mut in_file = std::fs::File::open(&normal_path)?; + let mut in_file = std::fs::File::open(normal_path)?; let mut encoder = Encoder::new(&mut out_file)?; std::io::copy(&mut in_file, &mut encoder)?; encoder.finish().into_result()?; } - let normal_len: f64 = std::fs::metadata(&normal_path).unwrap().len() as f64; + let normal_len: f64 = std::fs::metadata(normal_path).unwrap().len() as f64; let gzipped_len: f64 = std::fs::metadata(&gzip_path).unwrap().len() as f64; let ratio = gzipped_len / normal_len; eprintln!("Ratio: {}", ratio); if ratio <= 0.9 { - std::fs::remove_file(&normal_path)? + std::fs::remove_file(normal_path)? } else { println!( "cargo:warning={} compression ratio is {} (> 0.9), leaving as is", |