Remove Times trait
`Times::times` was always a second-class loop because it did not support the `break` and `continue` operations. Its playful appeal was then lost after `do` was disabled for closures. It's time to let this one go.
This commit is contained in:
@@ -234,20 +234,20 @@ mod tests {
|
||||
|
||||
spawn(proc() {
|
||||
port.recv();
|
||||
times.times(|| {
|
||||
for _ in range(0, times) {
|
||||
let mut stream = UnixStream::connect(&path2);
|
||||
stream.write([100]);
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
let mut acceptor = UnixListener::bind(&path1).listen();
|
||||
chan.send(());
|
||||
times.times(|| {
|
||||
for _ in range(0, times) {
|
||||
let mut client = acceptor.accept();
|
||||
let mut buf = [0];
|
||||
client.read(buf);
|
||||
assert_eq!(buf[0], 100);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user