File: generic_parameter_no_send.expanded.rs

package info (click to toggle)
rust-async-recursion 1.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 332 kB
  • sloc: makefile: 2
file content (13 lines) | stat: -rw-r--r-- 359 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
use async_recursion::async_recursion;
#[must_use]
pub fn generic_parameter_no_send<'async_recursion, T>(
    x: T,
    y: u64,
) -> ::core::pin::Pin<Box<dyn ::core::future::Future<Output = u64> + 'async_recursion>>
where
    T: 'async_recursion,
{
    Box::pin(async move {
        if y > 0 { generic_parameter_no_send(x, y - 1).await } else { 111 }
    })
}