summaryrefslogtreecommitdiffstats
path: root/tokio/tests
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2020-10-09 09:16:42 -0700
committerGitHub <noreply@github.com>2020-10-09 09:16:42 -0700
commitee597347c5e612611142ece09c79e55f2d243590 (patch)
tree5ef874817b2a75a9eea7a807cac48ec6ae776733 /tokio/tests
parent41ac1ae2bc9b2e4b6d03205bde19a4bbc20b368d (diff)
net: switch socket methods to &self (#2934)
Switches various socket methods from &mut self to &self. This uses the intrusive waker infrastructure to handle multiple waiters. Refs: #2928
Diffstat (limited to 'tokio/tests')
-rw-r--r--tokio/tests/uds_datagram.rs2
-rw-r--r--tokio/tests/uds_stream.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/tokio/tests/uds_datagram.rs b/tokio/tests/uds_datagram.rs
index 18dfcca0..ec2f6f82 100644
--- a/tokio/tests/uds_datagram.rs
+++ b/tokio/tests/uds_datagram.rs
@@ -78,7 +78,7 @@ async fn try_send_recv_never_block() -> io::Result<()> {
let payload = b"PAYLOAD";
let mut count = 0;
- let (mut dgram1, mut dgram2) = UnixDatagram::pair()?;
+ let (dgram1, dgram2) = UnixDatagram::pair()?;
// Send until we hit the OS `net.unix.max_dgram_qlen`.
loop {
diff --git a/tokio/tests/uds_stream.rs b/tokio/tests/uds_stream.rs
index 29f118a2..cd557e54 100644
--- a/tokio/tests/uds_stream.rs
+++ b/tokio/tests/uds_stream.rs
@@ -15,7 +15,7 @@ async fn accept_read_write() -> std::io::Result<()> {
.unwrap();
let sock_path = dir.path().join("connect.sock");
- let mut listener = UnixListener::bind(&sock_path)?;
+ let listener = UnixListener::bind(&sock_path)?;
let accept = listener.accept();
let connect = UnixStream::connect(&sock_path);
@@ -42,7 +42,7 @@ async fn shutdown() -> std::io::Result<()> {
.unwrap();
let sock_path = dir.path().join("connect.sock");
- let mut listener = UnixListener::bind(&sock_path)?;
+ let listener = UnixListener::bind(&sock_path)?;
let accept = listener.accept();
let connect = UnixStream::connect(&sock_path);