(
&self,
mut mutation: Mutation,
store: &S,
child: RepoTopic,
mut parent: RepoTopic,
parent_topics: BTreeSet<ParentTopic>,
)
| 630 | } |
| 631 | |
| 632 | fn persist_repo_topic<S>( |
| 633 | &self, |
| 634 | mut mutation: Mutation, |
| 635 | store: &S, |
| 636 | child: RepoTopic, |
| 637 | mut parent: RepoTopic, |
| 638 | parent_topics: BTreeSet<ParentTopic>, |
| 639 | ) -> Result<UpsertTopicResult> |
| 640 | where |
| 641 | S: SaveChangesForPrefix, |
| 642 | { |
| 643 | let date = chrono::Utc::now(); |
| 644 | parent.children.insert(child.to_topic_child(date)); |
| 645 | |
| 646 | let change = self.change(&child, &parent_topics, &parent, date); |
| 647 | mutation.save_topic(self.repo_id, &child)?; |
| 648 | mutation.save_topic(self.repo_id, &parent)?; |
| 649 | mutation.add_change(self.repo_id, &change)?; |
| 650 | mutation.write(store)?; |
| 651 | |
| 652 | Ok(UpsertTopicResult { |
| 653 | alerts: vec![], |
| 654 | matching_repo_topics: BTreeSet::new(), |
| 655 | repo_topic: Some(child), |
| 656 | saved: true, |
| 657 | }) |
| 658 | } |
| 659 | |
| 660 | fn update_repo_topic<S>( |
| 661 | &self, |
no test coverage detected