Claim the comments gathered up to the current position for the given entity.
(&mut self, entity: E)
| 514 | // Claim the comments gathered up to the current position for the |
| 515 | // given entity. |
| 516 | fn claim_gathered_comments<E: Into<AnyEntity>>(&mut self, entity: E) { |
| 517 | debug_assert!(self.gathering_comments); |
| 518 | let entity = entity.into(); |
| 519 | self.comments.extend( |
| 520 | self.gathered_comments |
| 521 | .drain(..) |
| 522 | .map(|text| Comment { entity, text }), |
| 523 | ); |
| 524 | self.gathering_comments = false; |
| 525 | } |
| 526 | |
| 527 | // Get the comments collected so far, clearing out the internal list. |
| 528 | fn take_comments(&mut self) -> Vec<Comment<'a>> { |
no test coverage detected