#[cfg(test)]
#[path = "wait_inner_test.rs"]
mod wait_inner_test;
fn wait_one_timeout_poll_inner<A: TimerAccess, T>(
this: Pin<&mut WaitOneTimeout<A, T>>,
cx: &mut Context<'_>,
) -> Poll<pi_result::RawResult<T, WaitTimeoutError>> {
let inner = unsafe { this.map_unchecked_mut(|value| &mut value.inner) };
match inner.poll(cx) {
Poll::Pending => Poll::Pending,
Poll::Ready(Ok(Ok(value))) => Poll::Ready(Ok(value)),
Poll::Ready(Ok(Err(error))) => Poll::Ready(Err(WaitTimeoutError::Wait(error))),
Poll::Ready(Err(TimeoutError::Elapsed)) => Poll::Ready(Err(WaitTimeoutError::Elapsed)),
Poll::Ready(Err(TimeoutError::Timer(error))) => Poll::Ready(Err(WaitTimeoutError::Timer(error))),
}
}
fn wait_any_timeout_poll_inner<A: TimerAccess, T>(
this: Pin<&mut WaitAnyTimeout<A, T>>,
cx: &mut Context<'_>,
) -> Poll<pi_result::RawResult<T, WaitTimeoutError>> {
let inner = unsafe { this.map_unchecked_mut(|value| &mut value.inner) };
match inner.poll(cx) {
Poll::Pending => Poll::Pending,
Poll::Ready(Ok(Ok(value))) => Poll::Ready(Ok(value)),
Poll::Ready(Ok(Err(error))) => Poll::Ready(Err(WaitTimeoutError::Wait(error))),
Poll::Ready(Err(TimeoutError::Elapsed)) => Poll::Ready(Err(WaitTimeoutError::Elapsed)),
Poll::Ready(Err(TimeoutError::Timer(error))) => Poll::Ready(Err(WaitTimeoutError::Timer(error))),
}
}
fn wait_all_timeout_poll_inner<A: TimerAccess, T>(
this: Pin<&mut WaitAllTimeout<A, T>>,
cx: &mut Context<'_>,
) -> Poll<pi_result::RawResult<Vec<pi_result::RawResult<T, WaitError>>, TimeoutError>> {
let inner = unsafe { this.map_unchecked_mut(|value| &mut value.inner) };
inner.poll(cx)
}