pub fn add_trait_bounds(mut generics: Generics, bound: &TypeParamBound) -> Generics {
    for param in &mut generics.params {
        if let GenericParam::Type(ref mut type_param) = *param {
            type_param.bounds.push(bound.clone());
        }
    }
    generics
}
// Add a bound to every type parameter.
Add a bound to every type parameter.
Add a bound to every type parameter .
pub fn add_trait_bounds(mut generics: Generics, bound: &TypeParamBound) -> Generics {
    for param in &mut generics.params {
        if let GenericParam::Type(ref mut type_param) = *param {
            type_param.bounds.push(bound.clone());
        }
    }
    generics
}
pub fn add_trait_bounds ( mut generics : Generics , bound : & TypeParamBound ) -> Generics { for param in & mut generics . params { if let GenericParam :: Type ( ref mut type_param ) = * param { type_param . bounds . push ( bound . clone ( ) ) ; } } generics }
Add a bound to every type parameter.
Add a bound to every type parameter .
generics
Generics
bound
&TypeParamBound
generics
Generics
bound
&TypeParamBound