src/pxar/format_definition.rs - PxarAttributes: derive Default

And remove unnecessary impl new().
This commit is contained in:
Dietmar Maurer
2019-08-02 07:16:10 +02:00
parent a92e6c9011
commit 27e6e180b6
2 changed files with 2 additions and 18 deletions

View File

@ -179,7 +179,7 @@ impl <'a, R: Read, F: Fn(&Path) -> Result<(), Error>> SequentialDecoder<'a, R, F
}
fn read_attributes(&mut self) -> Result<(CaFormatHeader, PxarAttributes), Error> {
let mut attr = PxarAttributes::new();
let mut attr = PxarAttributes::default();
let mut head: CaFormatHeader = self.read_item()?;
let mut size = (head.size - HEADER_SIZE) as usize;
loop {