diff options
| author | bors <bors@rust-lang.org> | 2015-02-05 15:22:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-02-05 15:22:48 +0000 |
| commit | 2c05354211b04a52cc66a0b8ad8b2225eaf9e972 (patch) | |
| tree | d9e86702774074efe4d9f44aba0fad8355e1655e /src/libstd/sys/unix | |
| parent | 2bd8ec2d197809fc0f0efccf1de14419ffb17b2b (diff) | |
| parent | 92f11e938a80a719badcd2168a2e38a2a800fcb6 (diff) | |
| download | rust-2c05354211b04a52cc66a0b8ad8b2225eaf9e972.tar.gz rust-2c05354211b04a52cc66a0b8ad8b2225eaf9e972.zip | |
Auto merge of #21843 - japaric:kindless, r=alexcrichton
This needs a snapshot that includes #21805 before it can be merged. There are some places where type inference regressed after I removed the annotations (see `FIXME`s). cc @nikomatsakis. r? @eddyb or anyone (I'll remove the `FIXME`s before merging, as they are only intended to point out regressions)
Diffstat (limited to 'src/libstd/sys/unix')
| -rw-r--r-- | src/libstd/sys/unix/pipe.rs | 8 | ||||
| -rw-r--r-- | src/libstd/sys/unix/process.rs | 6 |
2 files changed, 7 insertions, 7 deletions
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<uint> { 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<K,V>,&'static ProcessConfig<K,V>>(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<P>, dst: c_int| { + let setup = |src: Option<P>, dst: c_int| { let src = match src { None => { let flags = if dst == libc::STDIN_FILENO { |
