Skip to content

Commit

Permalink
Avoid copy for binary
Browse files Browse the repository at this point in the history
  • Loading branch information
jhorstmann committed Jan 2, 2025
1 parent b3206c4 commit 20edb5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl <'i> CompactThriftProtocol<'i> for Vec<u8> {

#[inline]
fn fill_thrift<T: CompactThriftInput<'i>>(&mut self, input: &mut T) -> Result<(), ThriftError> {
*self = input.read_binary()?.to_vec();
*self = input.read_binary()?.into_owned();
Ok(())
}

Expand Down

0 comments on commit 20edb5e

Please sign in to comment.