rustup; fix generator test

This commit is contained in:
Ralf Jung 2020-02-07 13:47:39 +01:00
parent 602e1a03fc
commit d208a5fe3b
3 changed files with 3 additions and 3 deletions

View file

@ -1 +1 @@
333c32a5a4a51cae562c47e0669bc5aeaf741c45
b5e21dbb5cabdaaadc47a4d8e3f59979dcad2871

View file

@ -25,7 +25,7 @@ where
fn next(&mut self) -> Option<Self::Item> {
let me = unsafe { Pin::new_unchecked(&mut self.0) };
match me.resume() {
match me.resume(()) {
GeneratorState::Yielded(x) => Some(x),
GeneratorState::Complete(_) => None,
}

View file

@ -9,7 +9,7 @@ fn finish<T>(mut amt: usize, mut t: T) -> T::Return
// We are not moving the `t` around until it gets dropped, so this is okay.
let mut t = unsafe { Pin::new_unchecked(&mut t) };
loop {
match t.as_mut().resume() {
match t.as_mut().resume(()) {
GeneratorState::Yielded(y) => amt -= y,
GeneratorState::Complete(ret) => {
assert_eq!(amt, 0);