rustup; fix generator test
This commit is contained in:
parent
602e1a03fc
commit
d208a5fe3b
3 changed files with 3 additions and 3 deletions
|
|
@ -1 +1 @@
|
|||
333c32a5a4a51cae562c47e0669bc5aeaf741c45
|
||||
b5e21dbb5cabdaaadc47a4d8e3f59979dcad2871
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue