Stop using the '<->' operator

This commit is contained in:
Alex Crichton
2013-05-06 00:42:54 -04:00
parent 7d22437ecd
commit 998fececd6
29 changed files with 214 additions and 296 deletions

View File

@@ -26,6 +26,7 @@ use core::cell::Cell;
use core::comm::{PortOne, oneshot, send_one};
use core::pipes::recv;
use core::task;
use core::util::replace;
#[doc = "The future type"]
#[cfg(stage0)]
@@ -77,8 +78,7 @@ pub impl<A> Future<A> {
}
}
{
let mut state = Evaluating;
self.state <-> state;
let state = replace(&mut self.state, Evaluating);
match state {
Forced(_) | Evaluating => fail!(~"Logic error."),
Pending(f) => {
@@ -108,8 +108,7 @@ pub impl<A> Future<A> {
}
}
{
let mut state = Evaluating;
self.state <-> state;
let state = replace(&mut self.state, Evaluating);
match state {
Forced(_) | Evaluating => fail!(~"Logic error."),
Pending(f) => {