fn first_lifetime(gen: &mut syn::Generics) -> syn::Lifetime {
    // Check if there already is a lifetime that we can use.
    if let Some(ltdef) = gen.lifetimes().next() {
        return ltdef.lifetime.clone();
    }

    // Otherwise generate one.
    let ltdef: syn::LifetimeDef = syn::parse_str("'a").unwrap();
    let lt = ltdef.lifetime.clone();
    gen.params.insert(0, syn::GenericParam::Lifetime(ltdef));
    lt
}
/// Pick the first lifetime from a `syn::Generics`, or create one.
///
/// This either returns the first lifetime in the generics, or adds a new
/// lifetime.
Pick the first lifetime from a `syn::Generics`, or create one.
This either returns the first lifetime in the generics, or adds a new
lifetime.
Pick the first lifetime from a ` syn :: Generics ` or create one . This either returns the first lifetime in the generics or adds a new lifetime .
fn first_lifetime(gen: &mut syn::Generics) -> syn::Lifetime {
    // Check if there already is a lifetime that we can use.
    if let Some(ltdef) = gen.lifetimes().next() {
        return ltdef.lifetime.clone();
    }
    // Otherwise generate one.
    let ltdef: syn::LifetimeDef = syn::parse_str("'a").unwrap();
    let lt = ltdef.lifetime.clone();
    gen.params.insert(0, syn::GenericParam::Lifetime(ltdef));
    lt
}
fn first_lifetime ( gen : & mut syn :: Generics ) -> syn :: Lifetime { // Check if there already is a lifetime that we can use. if let Some ( ltdef ) = gen . lifetimes ( ) . next ( ) { return ltdef . lifetime . clone ( ) ; } // Otherwise generate one. let ltdef : syn :: LifetimeDef = syn :: parse_str ( " " ) . unwrap ( ) ; let lt = ltdef . lifetime . clone ( ) ; gen . params . insert ( 0 , syn :: GenericParam :: Lifetime ( ltdef ) ) ; lt }
Pick the first lifetime from a `syn::Generics`, or create one.
Pick the first lifetime from a ` syn :: Generics ` or create one .
gen
&mut syn::Generics
gen
&mut syn::Generics