s/Generator/Coroutine/

This commit is contained in:
Oli Scherer
2023-10-19 16:06:43 +00:00
parent 96027d945b
commit 60956837cf
310 changed files with 1271 additions and 1271 deletions

View File

@@ -3,7 +3,7 @@
use core::fmt;
use core::future::Future;
use core::marker::Tuple;
use core::ops::{Generator, GeneratorState};
use core::ops::{Coroutine, CoroutineState};
use core::pin::Pin;
use core::task::{Context, Poll};
@@ -207,15 +207,15 @@ where
}
#[unstable(feature = "generator_trait", issue = "43122")] // also #98407
impl<R, G> Generator<R> for Exclusive<G>
impl<R, G> Coroutine<R> for Exclusive<G>
where
G: Generator<R> + ?Sized,
G: Coroutine<R> + ?Sized,
{
type Yield = G::Yield;
type Return = G::Return;
#[inline]
fn resume(self: Pin<&mut Self>, arg: R) -> GeneratorState<Self::Yield, Self::Return> {
fn resume(self: Pin<&mut Self>, arg: R) -> CoroutineState<Self::Yield, Self::Return> {
G::resume(self.get_pin_mut(), arg)
}
}