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

Function build_indentation

src/utils.rs:191–195  ·  view source on GitHub ↗

Generate a string filled with `indentation_amount` white-space literal `chars`. # Example ```rust for i in 0..64 { let indentations: String = (0..i).map(|_| '\u{0020}').collect(); assert_eq!(indentations.len(), i); } ```

(indentation_amount: i8)

Source from the content-addressed store, hash-verified

189/// }
190/// ```
191pub fn build_indentation(indentation_amount: i8) -> String {
192 // Change from empty whitespace char to Unicode whitespace
193 // representation for a bit more clarity.
194 (0..indentation_amount).map(|_| '\u{0020}').collect()
195}
196
197pub fn extract_struct_generics(s: syn::Generics) -> Vec<syn::Ident> {
198 s.params

Callers 3

write_commentsMethod · 0.85
process_fieldsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected