(&mut self, docs: &Docs)
| 1324 | } |
| 1325 | |
| 1326 | fn print_docs(&mut self, docs: &Docs) { |
| 1327 | if let Some(docs) = &docs.contents { |
| 1328 | let lines = docs |
| 1329 | .trim() |
| 1330 | .replace("<", "<") |
| 1331 | .replace(">", ">") |
| 1332 | .replace("*/", "*") // We can't close the comment, so if the user comment has */ we just remove the / |
| 1333 | .lines() |
| 1334 | .map(|line| format!("* {line}")) |
| 1335 | .collect::<Vec<_>>() |
| 1336 | .join("\n"); |
| 1337 | |
| 1338 | uwrite!( |
| 1339 | self.src, |
| 1340 | " |
| 1341 | /** |
| 1342 | {lines} |
| 1343 | */ |
| 1344 | " |
| 1345 | ) |
| 1346 | } |
| 1347 | } |
| 1348 | |
| 1349 | pub(crate) fn non_empty_type<'a>(&self, ty: Option<&'a Type>) -> Option<&'a Type> { |
| 1350 | if let Some(ty) = ty { |
no test coverage detected