Skip to content

Commit

Permalink
Fix mutability of buffers for a few send_* functions (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
coolreader18 authored Aug 13, 2020
1 parent 25f2949 commit 7bf31f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ impl Socket {
/// `send` call.
///
/// [`send`]: #method.send
pub fn send_with_flags(&self, buf: &mut [u8], flags: i32) -> io::Result<usize> {
pub fn send_with_flags(&self, buf: &[u8], flags: i32) -> io::Result<usize> {
self.inner.send(buf, flags)
}

Expand All @@ -330,7 +330,7 @@ impl Socket {
/// [`send`]: #method.send
/// [`out_of_band_inline`]: #method.out_of_band_inline
#[cfg(all(feature = "all", not(target_os = "redox")))]
pub fn send_out_of_band(&self, buf: &mut [u8]) -> io::Result<usize> {
pub fn send_out_of_band(&self, buf: &[u8]) -> io::Result<usize> {
self.inner.send(buf, MSG_OOB)
}

Expand Down

0 comments on commit 7bf31f9

Please sign in to comment.