(&mut self, topic: &RepoTopic)
| 18 | |
| 19 | impl<'r> Visitor for &mut ConsoleOutput<'r> { |
| 20 | fn visit_topic(&mut self, topic: &RepoTopic) -> Result<()> { |
| 21 | let meta = &topic.metadata; |
| 22 | let s = format! {r#" |
| 23 | Topic: [{}]({}) |
| 24 | Parent topics: |
| 25 | "#, |
| 26 | meta.name(Locale::EN), meta.id}; |
| 27 | self.buf.push_str(&s); |
| 28 | |
| 29 | for topic in &topic.parent_topics { |
| 30 | self.visit_parent_topic(topic)?; |
| 31 | } |
| 32 | |
| 33 | self.buf.push_str("Children:\n"); |
| 34 | |
| 35 | for child in &topic.children { |
| 36 | self.visit_topic_child(child)?; |
| 37 | } |
| 38 | |
| 39 | Ok(()) |
| 40 | } |
| 41 | |
| 42 | fn visit_link(&mut self, link: &RepoLink) -> Result<()> { |
| 43 | let s = format! {r#" |
no test coverage detected