We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b77f53 commit 82ff19aCopy full SHA for 82ff19a
src/future.rs
@@ -140,8 +140,7 @@ pub fn poll_fn<F, T>(f: F) -> impl Future<Output = T>
140
from_generator(|| {
141
let mut f = f;
142
loop {
143
- let poll_result = get_task_context(|context: &mut Context| f(context));
144
- match poll_result {
+ match get_task_context(|context: &mut Context| f(context)) {
145
Poll::Pending => yield,
146
Poll::Ready(value) => return value,
147
}
0 commit comments