You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TunPacket already stores the packet internally using bytes::Bytes, but it can only be constructed from a Vec via TunPacket::new. It would be nice to have a way (either a method of a From trait impl) to construct a TunPacket from Bytes directly, without going through the extra cloning in Bytes -> Vec -> Bytes.
The text was updated successfully, but these errors were encountered:
Code pointer:
https://github.com/meh/rust-tun/blob/e762c419d71438e67379f9b2fed89b5cb835cc6a/src/async/codec.rs#L77C1-L80C2
TunPacket
already stores the packet internally usingbytes::Bytes
, but it can only be constructed from aVec
viaTunPacket::new
. It would be nice to have a way (either a method of aFrom
trait impl) to construct aTunPacket
fromBytes
directly, without going through the extra cloning inBytes -> Vec -> Bytes
.The text was updated successfully, but these errors were encountered: