(&mut self, comments: &Vec<String>, indentation_amount: i8)
| 61 | |
| 62 | impl BuildState { |
| 63 | fn write_comments(&mut self, comments: &Vec<String>, indentation_amount: i8) { |
| 64 | let indentation = utils::build_indentation(indentation_amount); |
| 65 | match comments.len() { |
| 66 | 0 => (), |
| 67 | 1 => self |
| 68 | .types |
| 69 | .push_str(&format!("{}/** {} */\n", indentation, &comments[0])), |
| 70 | _ => { |
| 71 | self.types.push_str(&format!("{}/**\n", indentation)); |
| 72 | for comment in comments { |
| 73 | self.types |
| 74 | .push_str(&format!("{} * {}\n", indentation, &comment)) |
| 75 | } |
| 76 | self.types.push_str(&format!("{} */\n", indentation)) |
| 77 | } |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | fn process_rust_item(item: syn::Item, state: &mut BuildState, config: &BuildSettings) { |
no test coverage detected