File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed
Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -87,23 +87,18 @@ impl GzHeader {
8787 }
8888}
8989
90- #[ derive( Debug ) ]
90+ #[ derive( Debug , Default ) ]
9191pub enum GzHeaderState {
9292 Start ( u8 , [ u8 ; 10 ] ) ,
9393 Xlen ( Option < Box < Crc > > , u8 , [ u8 ; 2 ] ) ,
9494 Extra ( Option < Box < Crc > > , u16 ) ,
9595 Filename ( Option < Box < Crc > > ) ,
9696 Comment ( Option < Box < Crc > > ) ,
9797 Crc ( Option < Box < Crc > > , u8 , [ u8 ; 2 ] ) ,
98+ #[ default]
9899 Complete ,
99100}
100101
101- impl Default for GzHeaderState {
102- fn default ( ) -> Self {
103- Self :: Complete
104- }
105- }
106-
107102#[ derive( Debug , Default ) ]
108103pub struct GzHeaderParser {
109104 state : GzHeaderState ,
@@ -317,7 +312,7 @@ fn corrupt() -> Error {
317312/// # Ok(())
318313/// # }
319314/// ```
320- #[ derive( Debug ) ]
315+ #[ derive( Debug , Default ) ]
321316pub struct GzBuilder {
322317 extra : Option < Vec < u8 > > ,
323318 filename : Option < CString > ,
@@ -326,12 +321,6 @@ pub struct GzBuilder {
326321 mtime : u32 ,
327322}
328323
329- impl Default for GzBuilder {
330- fn default ( ) -> Self {
331- Self :: new ( )
332- }
333- }
334-
335324impl GzBuilder {
336325 /// Create a new blank builder with no header by default.
337326 pub fn new ( ) -> GzBuilder {
You can’t perform that action at this time.
0 commit comments