Skip to content

Commit

Permalink
Use slices instead of vecs where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
morr0ne committed Nov 21, 2024
1 parent e62dad8 commit 17483f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wire/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl MessageCodec {
fn decode(
&mut self,
src: &mut BytesMut,
fds: &mut Vec<RawFd>,
fds: &mut [RawFd],
) -> std::result::Result<Option<Message>, DecodeError> {
if src.is_empty() {
return Ok(None);
Expand All @@ -56,7 +56,7 @@ impl MessageCodec {
fn decode_eof(
&mut self,
buf: &mut BytesMut,
fds: &mut Vec<RawFd>,
fds: &mut [RawFd],
) -> Result<Option<Message>, DecodeError> {
match self.decode(buf, fds)? {
Some(frame) => Ok(Some(frame)),
Expand Down

0 comments on commit 17483f8

Please sign in to comment.