1
Fork 0

Don't pass in a vector to Encoder::new.

It's not necessary.
This commit is contained in:
Nicholas Nethercote 2022-06-07 13:30:08 +10:00
parent 92b1ab8d57
commit 582b9cbc45
4 changed files with 5 additions and 5 deletions

View file

@ -18,8 +18,8 @@ pub struct Encoder {
}
impl Encoder {
pub fn new(data: Vec<u8>) -> Encoder {
Encoder { data }
pub fn new() -> Encoder {
Encoder { data: vec![] }
}
pub fn into_inner(self) -> Vec<u8> {