scovich commented on code in PR #7911: URL: https://github.com/apache/arrow-rs/pull/7911#discussion_r2203043166
########## parquet-variant/src/builder.rs: ########## @@ -61,9 +61,21 @@ fn write_offset(buf: &mut Vec<u8>, value: usize, nbytes: u8) { buf.extend_from_slice(&bytes[..nbytes as usize]); } -#[derive(Default)] +#[derive(Debug, Default)] struct ValueBuffer(Vec<u8>); +impl ValueBuffer { + /// Construct a ValueBuffer that will write to a new underlying `Vec` + fn new() -> Self { + Default::default() + } + + /// Construct a ValueBuffer from an existing buffer + fn from_existing(existing: Vec<u8>) -> Self { Review Comment: Any reason not to just `impl From` and be done with it? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org