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:
Brendan Zabarauskas
2014-01-30 11:20:34 +11:00
parent dfb61166f5
commit 729060dbb9
47 changed files with 151 additions and 200 deletions

View File

@@ -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]