File: lifetimes_no_send_bound.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 (16 lines) | stat: -rw-r--r-- 472 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use async_recursion::async_recursion;
struct Node<'a, T> {
    ptr: &'a T,
}
#[must_use]
fn contains_value<'a, 'life0, 'life1, 'async_recursion, T: PartialEq>(
    value: &'life0 T,
    node: &'life1 Node<'a, T>,
) -> ::core::pin::Pin<Box<dyn ::core::future::Future<Output = bool> + 'async_recursion>>
where
    T: 'async_recursion,
    'life0: 'async_recursion,
    'life1: 'async_recursion,
{
    Box::pin(async move { if &node.ptr == value { true } else { false } })
}