use default for textprotocol

This commit is contained in:
Noa Aarts 2024-10-19 15:38:51 +02:00
parent a27dcf013f
commit 721e3fca34
Signed by: noa
GPG key ID: 1850932741EFF672

View file

@ -106,7 +106,7 @@ where
fn change_protocol(&mut self, protocol: &Protocol) {
match protocol {
Protocol::Text => self.parser = ParserTypes::TextParser(TextParser::new(0)),
Protocol::Text => self.parser = ParserTypes::TextParser(TextParser::default()),
Protocol::Binary => self.parser = ParserTypes::BinaryParser(BinaryParser::default()),
}
}
@ -116,7 +116,7 @@ where
reader: BufReader::new(reader),
writer: BufWriter::new(writer),
grids,
parser: ParserTypes::TextParser(TextParser::new(0)),
parser: ParserTypes::TextParser(TextParser::default()),
counter: 0,
}
}