Skip to content

Commit

Permalink
smh
Browse files Browse the repository at this point in the history
  • Loading branch information
0xcrust committed Sep 27, 2023
1 parent a793066 commit 305e852
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions transports/noise/src/io/framed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl<S: SessionState> Codec<S> {
}
}

fn encode_bytes(&mut self, item: &[u8], dst: &mut BytesMut) -> Result<(), io::Error> {
fn encode_bytes(&mut self, item: &Vec<u8>, dst: &mut BytesMut) -> Result<(), io::Error> {
self.encrypt_buffer
.resize(item.len() + EXTRA_ENCRYPT_SPACE, 0);
let n = match self.session.write_message(item, &mut self.encrypt_buffer) {
Expand Down Expand Up @@ -179,7 +179,7 @@ impl asynchronous_codec::Decoder for Codec<snow::HandshakeState> {

impl asynchronous_codec::Encoder for Codec<snow::TransportState> {
type Error = io::Error;
type Item<'a> = &'a [u8];
type Item<'a> = &'a Vec<u8>;

fn encode(&mut self, item: Self::Item<'_>, dst: &mut BytesMut) -> Result<(), Self::Error> {
self.encode_bytes(item, dst)
Expand Down

0 comments on commit 305e852

Please sign in to comment.