this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor(backends): drop redundant overrides and dead-code allows

+4 -15
+2 -7
src/backends/bzip2.rs
··· 2 2 use crate::{ 3 3 progress::{ProgressArgs, copy_with_progress}, 4 4 utils::{ 5 - CmprssInput, CmprssOutput, CommonArgs, CompressionLevelValidator, Compressor, 6 - ExtractedTarget, LevelArgs, Result, 5 + CmprssInput, CmprssOutput, CommonArgs, CompressionLevelValidator, Compressor, LevelArgs, 6 + Result, 7 7 }, 8 8 }; 9 9 use bzip2::Compression; ··· 80 80 /// Name of this compressor 81 81 fn name(&self) -> &str { 82 82 "bzip2" 83 - } 84 - 85 - /// Bzip2 extracts to a file by default 86 - fn default_extracted_target(&self) -> ExtractedTarget { 87 - ExtractedTarget::File 88 83 } 89 84 90 85 /// Compress an input file or pipe to a bz2 archive
+1 -6
src/backends/gzip.rs
··· 2 2 use crate::progress::{ProgressArgs, copy_with_progress}; 3 3 use crate::utils::{ 4 4 CmprssInput, CmprssOutput, CommonArgs, CompressionLevelValidator, Compressor, 5 - DefaultCompressionValidator, ExtractedTarget, LevelArgs, Result, 5 + DefaultCompressionValidator, LevelArgs, Result, 6 6 }; 7 7 use clap::Args; 8 8 use flate2::write::GzEncoder; ··· 54 54 /// Full name for gzip. 55 55 fn name(&self) -> &str { 56 56 "gzip" 57 - } 58 - 59 - /// Gzip extracts to a file by default 60 - fn default_extracted_target(&self) -> ExtractedTarget { 61 - ExtractedTarget::File 62 57 } 63 58 64 59 /// Compress an input file or pipe to a gzip archive
+1 -2
src/utils.rs
··· 66 66 } 67 67 68 68 /// Trait for validating compression levels for different compressors 69 - #[allow(dead_code)] 70 69 pub trait CompressionLevelValidator { 71 70 /// Get the minimum valid compression level 72 71 fn min_level(&self) -> i32; ··· 81 80 fn name_to_level(&self, name: &str) -> Option<i32>; 82 81 83 82 /// Validate if a compression level is within the valid range 83 + #[cfg(test)] 84 84 fn is_valid_level(&self, level: i32) -> bool { 85 85 level >= self.min_level() && level <= self.max_level() 86 86 } ··· 174 174 } 175 175 176 176 /// Common interface for all compressor implementations 177 - #[allow(unused_variables)] 178 177 pub trait Compressor: Send + Sync { 179 178 /// Name of this Compressor 180 179 fn name(&self) -> &str;