From 571cc7f8e98da46735a5728387c768cde75d010c Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sun, 1 Feb 2015 12:44:15 -0500 Subject: remove all kind annotations from closures --- src/libstd/sys/common/helper_thread.rs | 4 ++-- src/libstd/sys/common/net.rs | 14 +++++++------- src/libstd/sys/unix/pipe.rs | 8 ++++---- src/libstd/sys/unix/process.rs | 6 +++--- src/libstd/sys/windows/process.rs | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/libstd/sys') diff --git a/src/libstd/sys/common/helper_thread.rs b/src/libstd/sys/common/helper_thread.rs index 6f6179a436e..255f474d4f4 100644 --- a/src/libstd/sys/common/helper_thread.rs +++ b/src/libstd/sys/common/helper_thread.rs @@ -95,14 +95,14 @@ impl Helper { let receive = RaceBox(receive); let t = f(); - Thread::spawn(move |:| { + Thread::spawn(move || { helper(receive.0, rx, t); let _g = self.lock.lock().unwrap(); *self.shutdown.get() = true; self.cond.notify_one() }); - rt::at_exit(move|:| { self.shutdown() }); + rt::at_exit(move|| { self.shutdown() }); *self.initialized.get() = true; } } diff --git a/src/libstd/sys/common/net.rs b/src/libstd/sys/common/net.rs index 833de8adda4..7325e0a5ac8 100644 --- a/src/libstd/sys/common/net.rs +++ b/src/libstd/sys/common/net.rs @@ -723,8 +723,8 @@ impl TcpStream { pub fn read(&mut self, buf: &mut [u8]) -> IoResult { let fd = self.fd(); - let dolock = |&:| self.lock_nonblocking(); - let doread = |&mut: nb| unsafe { + let dolock = || self.lock_nonblocking(); + let doread = |nb| unsafe { let flags = if nb {c::MSG_DONTWAIT} else {0}; libc::recv(fd, buf.as_mut_ptr() as *mut libc::c_void, @@ -736,8 +736,8 @@ impl TcpStream { pub fn write(&mut self, buf: &[u8]) -> IoResult<()> { let fd = self.fd(); - let dolock = |&:| self.lock_nonblocking(); - let dowrite = |&: nb: bool, buf: *const u8, len: uint| unsafe { + let dolock = || self.lock_nonblocking(); + let dowrite = |nb: bool, buf: *const u8, len: uint| unsafe { let flags = if nb {c::MSG_DONTWAIT} else {0}; libc::send(fd, buf as *const _, @@ -871,7 +871,7 @@ impl UdpSocket { let mut addrlen: libc::socklen_t = mem::size_of::() as libc::socklen_t; - let dolock = |&:| self.lock_nonblocking(); + let dolock = || self.lock_nonblocking(); let n = try!(read(fd, self.read_deadline, dolock, |nb| unsafe { let flags = if nb {c::MSG_DONTWAIT} else {0}; libc::recvfrom(fd, @@ -892,8 +892,8 @@ impl UdpSocket { let dstp = &storage as *const _ as *const libc::sockaddr; let fd = self.fd(); - let dolock = |&: | self.lock_nonblocking(); - let dowrite = |&mut: nb, buf: *const u8, len: uint| unsafe { + let dolock = || self.lock_nonblocking(); + let dowrite = |nb, buf: *const u8, len: uint| unsafe { let flags = if nb {c::MSG_DONTWAIT} else {0}; libc::sendto(fd, buf as *const libc::c_void, diff --git a/src/libstd/sys/unix/pipe.rs b/src/libstd/sys/unix/pipe.rs index 16274a2ab08..45d5b1506c3 100644 --- a/src/libstd/sys/unix/pipe.rs +++ b/src/libstd/sys/unix/pipe.rs @@ -151,8 +151,8 @@ impl UnixStream { pub fn read(&mut self, buf: &mut [u8]) -> IoResult { let fd = self.fd(); - let dolock = |&:| self.lock_nonblocking(); - let doread = |&mut: nb| unsafe { + let dolock = || self.lock_nonblocking(); + let doread = |nb| unsafe { let flags = if nb {c::MSG_DONTWAIT} else {0}; libc::recv(fd, buf.as_mut_ptr() as *mut libc::c_void, @@ -164,8 +164,8 @@ impl UnixStream { pub fn write(&mut self, buf: &[u8]) -> IoResult<()> { let fd = self.fd(); - let dolock = |&: | self.lock_nonblocking(); - let dowrite = |&: nb: bool, buf: *const u8, len: uint| unsafe { + let dolock = || self.lock_nonblocking(); + let dowrite = |nb: bool, buf: *const u8, len: uint| unsafe { let flags = if nb {c::MSG_DONTWAIT} else {0}; libc::send(fd, buf as *const _, diff --git a/src/libstd/sys/unix/process.rs b/src/libstd/sys/unix/process.rs index 20f86227e8e..52a8ac9c338 100644 --- a/src/libstd/sys/unix/process.rs +++ b/src/libstd/sys/unix/process.rs @@ -84,8 +84,8 @@ impl Process { mem::transmute::<&ProcessConfig,&'static ProcessConfig>(cfg) }; - with_envp(cfg.env(), move|: envp: *const c_void| { - with_argv(cfg.program(), cfg.args(), move|: argv: *const *const libc::c_char| unsafe { + with_envp(cfg.env(), move|envp: *const c_void| { + with_argv(cfg.program(), cfg.args(), move|argv: *const *const libc::c_char| unsafe { let (input, mut output) = try!(sys::os::pipe()); // We may use this in the child, so perform allocations before the @@ -185,7 +185,7 @@ impl Process { // up /dev/null into that file descriptor. Otherwise, the first file // descriptor opened up in the child would be numbered as one of the // stdio file descriptors, which is likely to wreak havoc. - let setup = |&: src: Option

, dst: c_int| { + let setup = |src: Option

, dst: c_int| { let src = match src { None => { let flags = if dst == libc::STDIN_FILENO { diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs index 315c41e779a..839263f1f17 100644 --- a/src/libstd/sys/windows/process.rs +++ b/src/libstd/sys/windows/process.rs @@ -169,7 +169,7 @@ impl Process { // Similarly to unix, we don't actually leave holes for the stdio file // descriptors, but rather open up /dev/null equivalents. These // equivalents are drawn from libuv's windows process spawning. - let set_fd = |&: fd: &Option

, slot: &mut HANDLE, + let set_fd = |fd: &Option

, slot: &mut HANDLE, is_stdin: bool| { match *fd { None => { -- cgit 1.4.1-3-g733a5