MCPcopy Create free account
hub / github.com/Wulf/tsync / format_generics

Function format_generics

src/utils.rs:210–221  ·  view source on GitHub ↗
(generics: &[syn::Ident])

Source from the content-addressed store, hash-verified

208}
209
210pub 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.
224pub fn type_contains_ident(ty: &syn::Type, ident: &syn::Ident) -> bool {

Callers 2

convert_to_tsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected