Skip to content

Commit 82ff19a

Browse files
committed
Increase coverage for future::poll_fn
1 parent 7b77f53 commit 82ff19a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/future.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ pub fn poll_fn<F, T>(f: F) -> impl Future<Output = T>
140140
from_generator(|| {
141141
let mut f = f;
142142
loop {
143-
let poll_result = get_task_context(|context: &mut Context| f(context));
144-
match poll_result {
143+
match get_task_context(|context: &mut Context| f(context)) {
145144
Poll::Pending => yield,
146145
Poll::Ready(value) => return value,
147146
}

0 commit comments

Comments
 (0)