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)
| 189 | /// } |
| 190 | /// ``` |
| 191 | pub 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 | |
| 197 | pub fn extract_struct_generics(s: syn::Generics) -> Vec<syn::Ident> { |
| 198 | s.params |
no outgoing calls
no test coverage detected