MCPcopy Index your code
hub / github.com/emwalker/digraph / change

Function change

backend/src/git/activity.rs:1534–1548  ·  view source on GitHub ↗
(topic: &RepoTopic, previous: Option<Timerange>)

Source from the content-addressed store, hash-verified

1532 }
1533
1534 fn change(topic: &RepoTopic, previous: Option<Timerange>) -> Change {
1535 let mut parent_topics = BTreeSet::new();
1536 for parent in &topic.parent_topics {
1537 parent_topics.insert(parent.id.to_owned());
1538 }
1539
1540 Change::RemoveTopicTimerange(RemoveTopicTimerange {
1541 actor_id: "2".to_owned(),
1542 date: chrono::Utc::now(),
1543 id: Change::new_id(),
1544 parent_topics: parent_topics.iter().map(|path| path.to_owned()).collect(),
1545 previous_timerange: previous,
1546 updated_topic: TopicInfo::from(topic),
1547 })
1548 }
1549
1550 #[test]
1551 fn simple_case() {

Callers 6

simple_caseFunction · 0.85
parent_topicsFunction · 0.85
start_year_formatFunction · 0.85
start_year_month_formatFunction · 0.85
none_formatFunction · 0.85
parent_referencesFunction · 0.85

Calls 4

insertMethod · 0.80
iterMethod · 0.45

Tested by 6

simple_caseFunction · 0.68
parent_topicsFunction · 0.68
start_year_formatFunction · 0.68
start_year_month_formatFunction · 0.68
none_formatFunction · 0.68
parent_referencesFunction · 0.68