Update with Poll/Async changes

This commit is contained in:
Alex Crichton
2016-09-02 12:17:38 -07:00
parent 3282b3ec0d
commit 3794cf7f1d
17 changed files with 103 additions and 124 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ impl<A, T> Future for ReadExact<A, T>
let n = try_nb!(a.read(&mut buf[*pos..]));
*pos += n;
if n == 0 {
return Poll::Err(eof())
return Err(eof())
}
}
}
@@ -70,7 +70,7 @@ impl<A, T> Future for ReadExact<A, T>
}
match mem::replace(&mut self.state, State::Empty) {
State::Reading { a, buf, .. } => Poll::Ok((a, buf)),
State::Reading { a, buf, .. } => Ok((a, buf).into()),
State::Empty => panic!(),
}
}