From dd8f07223346b06da723c25a3ac42f874e6c945c Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Thu, 2 Jan 2020 08:56:12 +0000 Subject: Use drop instead of the toilet closure `|_| ()` --- src/libstd/sys/unix/pipe.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd/sys/unix/pipe.rs') diff --git a/src/libstd/sys/unix/pipe.rs b/src/libstd/sys/unix/pipe.rs index 77fefef8a18..2a861c87801 100644 --- a/src/libstd/sys/unix/pipe.rs +++ b/src/libstd/sys/unix/pipe.rs @@ -99,11 +99,11 @@ pub fn read2(p1: AnonPipe, v1: &mut Vec, p2: AnonPipe, v2: &mut Vec) -> if fds[0].revents != 0 && read(&p1, v1)? { p2.set_nonblocking(false)?; - return p2.read_to_end(v2).map(|_| ()); + return p2.read_to_end(v2).map(drop); } if fds[1].revents != 0 && read(&p2, v2)? { p1.set_nonblocking(false)?; - return p1.read_to_end(v1).map(|_| ()); + return p1.read_to_end(v1).map(drop); } } -- cgit 1.4.1-3-g733a5