Skip to content

Commit 740953a

Browse files
committed
Drop UFCS for set_read_timeout
The native method has been gone since 1.4.0
1 parent bb837bd commit 740953a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/priv_io.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ pub trait StreamOptions {
3030
impl StreamOptions for BufStream<Box<StreamWrapper>> {
3131
fn set_read_timeout(&self, timeout: Option<Duration>) -> io::Result<()> {
3232
match self.get_ref().get_ref().0 {
33-
InternalStream::Tcp(ref s) => {
34-
<TcpStream as TcpStreamExt>::set_read_timeout(s, timeout)
35-
}
33+
InternalStream::Tcp(ref s) => s.set_read_timeout(timeout),
3634
#[cfg(feature = "unix_socket")]
3735
InternalStream::Unix(ref s) => s.set_read_timeout(timeout),
3836
}

0 commit comments

Comments
 (0)