diff --git a/src/model_01.rs b/src/model_01.rs
index 35e9fb7..acc13e9 100644
--- a/src/model_01.rs
+++ b/src/model_01.rs
@@ -1,9 +1,9 @@
use std::{
- future::Future,
pin::Pin,
task::{Context, Poll},
};
+use futures::{future::ready, Future, FutureExt};
use pin_project::pin_project;
trait More {
@@ -379,26 +379,31 @@ trait TraitInto {
}
impl>> TraitInto for I {
+ #[inline]
fn trait_into(self) -> A {
I::method_s(self)
}
}
+#[repr(transparent)]
#[pin_project]
struct TraitFuture>(#[pin] F);
impl> Future for TraitFuture {
type Output = F::Associated;
+ #[inline]
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll {
F::method((self.project().0, cx))
}
}
+#[inline]
fn aaaaaaa(a: impl Impl>) -> A {
a.trait_into()
}
+#[inline]
fn aaaaaa<
A,
Ot: ?Sized + OverlayTrait>,
@@ -411,7 +416,8 @@ fn aaaaaa<
aaaaaaa::(a)
}
-async fn aaaaa<
+#[inline]
+fn aaaaa<
A,
Ot: ?Sized + OverlayTrait>,
Om: ?Sized + OverlayMore,
@@ -419,12 +425,11 @@ async fn aaaaa<
I: ImplOverlay + Impl + ImplMember,
>(
a: I,
-) -> A {
- let a = TraitFuture(a).await;
- let a: >::_Associated = a;
- aaaaaa::(a)
+) -> impl Future