(generics: &[syn::Ident])
| 208 | } |
| 209 | |
| 210 | pub fn format_generics(generics: &[syn::Ident]) -> String { |
| 211 | if generics.is_empty() { |
| 212 | return String::new(); |
| 213 | } |
| 214 | |
| 215 | let generics = generics |
| 216 | .iter() |
| 217 | .map(|g| g.to_string()) |
| 218 | .collect::<Vec<_>>() |
| 219 | .join(", "); |
| 220 | format!("<{}>", generics) |
| 221 | } |
| 222 | |
| 223 | /// Determine whether a type contains the given ident. |
| 224 | pub fn type_contains_ident(ty: &syn::Type, ident: &syn::Ident) -> bool { |
no outgoing calls
no test coverage detected