{"action":"created","comment":{"url":"https://api.github.com/repos/libra/libra/pulls/comments/343829487","pull_request_review_id":313578297,"id":343829487,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0MzgyOTQ4Nw==","diff_hunk":"@@ -362,56 +285,7 @@ impl BorrowMap {\n // Joins\n //**********************************************************************************************\n \n-pub fn union_sets<T: Ord + Clone>(s1: &BTreeSet<T>, s2: &BTreeSet<T>) -> BTreeSet<T> {\n-    s1.union(&s2).cloned().collect()\n-}\n-\n-pub fn union_map<K: Ord + Clone, V: Clone, F: FnMut(&K, &V, &V) -> V>(\n-    m1: &BTreeMap<K, V>,\n-    m2: &BTreeMap<K, V>,\n-    mut f: F,\n-) -> BTreeMap<K, V> {\n-    let mut joined = BTreeMap::new();\n-    for (k, v1) in m1 {\n-        let v = match m2.get(k) {\n-            None => v1.clone(),\n-            Some(v2) => f(k, v1, v2),\n-        };\n-        assert!(joined.insert(k.clone(), v).is_none())\n-    }\n-    for (k, v2) in m2.iter() {\n-        if !joined.contains_key(&k) {\n-            assert!(joined.insert(k.clone(), v2.clone()).is_none())\n-        }\n-    }\n-    joined\n-}\n-\n-impl BorrowEdges {\n-    fn join(&self, other: &Self) -> Self {\n-        Self(union_map(&self.0, &other.0, |_, s1, s2| union_sets(s1, s2)))\n-    }\n-}\n-\n-impl Ref {\n-    fn join(&self, other: &Self) -> Self {\n-        let borrowed_by = self.borrowed_by.join(&other.borrowed_by);\n-        let borrows_from = union_sets(&self.borrows_from, &other.borrows_from);\n-        assert!(\n-            self.mutable == other.mutable,\n-            \"ICE type checking or freezing failed\"\n-        );\n-        let mutable = self.mutable;\n-\n-        Self {\n-            borrowed_by,\n-            borrows_from,\n-            mutable,\n-        }\n-    }\n-}\n-\n-impl BorrowMap {\n+impl<Loc: Copy, Lbl: Clone + Eq + Ord> BorrowGraph<Loc, Lbl> {","path":"language/borrow-graph/src/graph/mod.rs","position":414,"original_position":414,"commit_id":"059c9aca44f8f25c3f4004576c15482820b48efb","original_commit_id":"059c9aca44f8f25c3f4004576c15482820b48efb","user":{"login":"tnowacki","id":1753366,"node_id":"MDQ6VXNlcjE3NTMzNjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1753366?v=4","gravatar_id":"","url":"https://api.github.com/users/tnowacki","html_url":"https://github.com/tnowacki","followers_url":"https://api.github.com/users/tnowacki/followers","following_url":"https://api.github.com/users/tnowacki/following{/other_user}","gists_url":"https://api.github.com/users/tnowacki/gists{/gist_id}","starred_url":"https://api.github.com/users/tnowacki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnowacki/subscriptions","organizations_url":"https://api.github.com/users/tnowacki/orgs","repos_url":"https://api.github.com/users/tnowacki/repos","events_url":"https://api.github.com/users/tnowacki/events{/privacy}","received_events_url":"https://api.github.com/users/tnowacki/received_events","type":"User","site_admin":false},"body":"ditto","created_at":"2019-11-07T19:23:10Z","updated_at":"2019-11-07T19:23:10Z","html_url":"https://github.com/libra/libra/pull/1642#discussion_r343829487","pull_request_url":"https://api.github.com/repos/libra/libra/pulls/1642","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/libra/libra/pulls/comments/343829487"},"html":{"href":"https://github.com/libra/libra/pull/1642#discussion_r343829487"},"pull_request":{"href":"https://api.github.com/repos/libra/libra/pulls/1642"}},"in_reply_to_id":343807465},"pull_request":{"url":"https://api.github.com/repos/libra/libra/pulls/1642","id":337749308,"node_id":"MDExOlB1bGxSZXF1ZXN0MzM3NzQ5MzA4","html_url":"https://github.com/libra/libra/pull/1642","diff_url":"https://github.com/libra/libra/pull/1642.diff","patch_url":"https://github.com/libra/libra/pull/1642.patch","issue_url":"https://api.github.com/repos/libra/libra/issues/1642","number":1642,"state":"open","locked":false,"title":"[language] Standalone borrow graph crate","user":{"login":"tnowacki","id":1753366,"node_id":"MDQ6VXNlcjE3NTMzNjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1753366?v=4","gravatar_id":"","url":"https://api.github.com/users/tnowacki","html_url":"https://github.com/tnowacki","followers_url":"https://api.github.com/users/tnowacki/followers","following_url":"https://api.github.com/users/tnowacki/following{/other_user}","gists_url":"https://api.github.com/users/tnowacki/gists{/gist_id}","starred_url":"https://api.github.com/users/tnowacki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnowacki/subscriptions","organizations_url":"https://api.github.com/users/tnowacki/orgs","repos_url":"https://api.github.com/users/tnowacki/repos","events_url":"https://api.github.com/users/tnowacki/events{/privacy}","received_events_url":"https://api.github.com/users/tnowacki/received_events","type":"User","site_admin":false},"body":"## Motivation\r\n\r\n- Factored out borrow graph from move-lang crate\r\n- Crate can be used later by the bytecode verifier\r\n\r\n## Test Plan\r\n\r\ncargo test \r\nmanually checked move-lang stdlib \r\n\r\n## Related PRs\r\n\r\n#1598","created_at":"2019-11-06T22:53:38Z","updated_at":"2019-11-07T19:23:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b926347cb751249da42d2070674df7fbcd89872","assignee":null,"assignees":[],"requested_reviewers":[{"login":"sblackshear","id":3513142,"node_id":"MDQ6VXNlcjM1MTMxNDI=","avatar_url":"https://avatars0.githubusercontent.com/u/3513142?v=4","gravatar_id":"","url":"https://api.github.com/users/sblackshear","html_url":"https://github.com/sblackshear","followers_url":"https://api.github.com/users/sblackshear/followers","following_url":"https://api.github.com/users/sblackshear/following{/other_user}","gists_url":"https://api.github.com/users/sblackshear/gists{/gist_id}","starred_url":"https://api.github.com/users/sblackshear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sblackshear/subscriptions","organizations_url":"https://api.github.com/users/sblackshear/orgs","repos_url":"https://api.github.com/users/sblackshear/repos","events_url":"https://api.github.com/users/sblackshear/events{/privacy}","received_events_url":"https://api.github.com/users/sblackshear/received_events","type":"User","site_admin":false},{"login":"dariorussi","id":4442497,"node_id":"MDQ6VXNlcjQ0NDI0OTc=","avatar_url":"https://avatars1.githubusercontent.com/u/4442497?v=4","gravatar_id":"","url":"https://api.github.com/users/dariorussi","html_url":"https://github.com/dariorussi","followers_url":"https://api.github.com/users/dariorussi/followers","following_url":"https://api.github.com/users/dariorussi/following{/other_user}","gists_url":"https://api.github.com/users/dariorussi/gists{/gist_id}","starred_url":"https://api.github.com/users/dariorussi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dariorussi/subscriptions","organizations_url":"https://api.github.com/users/dariorussi/orgs","repos_url":"https://api.github.com/users/dariorussi/repos","events_url":"https://api.github.com/users/dariorussi/events{/privacy}","received_events_url":"https://api.github.com/users/dariorussi/received_events","type":"User","site_admin":false},{"login":"shazqadeer","id":7672086,"node_id":"MDQ6VXNlcjc2NzIwODY=","avatar_url":"https://avatars2.githubusercontent.com/u/7672086?v=4","gravatar_id":"","url":"https://api.github.com/users/shazqadeer","html_url":"https://github.com/shazqadeer","followers_url":"https://api.github.com/users/shazqadeer/followers","following_url":"https://api.github.com/users/shazqadeer/following{/other_user}","gists_url":"https://api.github.com/users/shazqadeer/gists{/gist_id}","starred_url":"https://api.github.com/users/shazqadeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shazqadeer/subscriptions","organizations_url":"https://api.github.com/users/shazqadeer/orgs","repos_url":"https://api.github.com/users/shazqadeer/repos","events_url":"https://api.github.com/users/shazqadeer/events{/privacy}","received_events_url":"https://api.github.com/users/shazqadeer/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1465936153,"node_id":"MDU6TGFiZWwxNDY1OTM2MTUz","url":"https://api.github.com/repos/libra/libra/labels/language","name":"language","color":"a78ae2","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/libra/libra/pulls/1642/commits","review_comments_url":"https://api.github.com/repos/libra/libra/pulls/1642/comments","review_comment_url":"https://api.github.com/repos/libra/libra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libra/libra/issues/1642/comments","statuses_url":"https://api.github.com/repos/libra/libra/statuses/059c9aca44f8f25c3f4004576c15482820b48efb","head":{"label":"tnowacki:standalone_borrow","ref":"standalone_borrow","sha":"059c9aca44f8f25c3f4004576c15482820b48efb","user":{"login":"tnowacki","id":1753366,"node_id":"MDQ6VXNlcjE3NTMzNjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1753366?v=4","gravatar_id":"","url":"https://api.github.com/users/tnowacki","html_url":"https://github.com/tnowacki","followers_url":"https://api.github.com/users/tnowacki/followers","following_url":"https://api.github.com/users/tnowacki/following{/other_user}","gists_url":"https://api.github.com/users/tnowacki/gists{/gist_id}","starred_url":"https://api.github.com/users/tnowacki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnowacki/subscriptions","organizations_url":"https://api.github.com/users/tnowacki/orgs","repos_url":"https://api.github.com/users/tnowacki/repos","events_url":"https://api.github.com/users/tnowacki/events{/privacy}","received_events_url":"https://api.github.com/users/tnowacki/received_events","type":"User","site_admin":false},"repo":{"id":198513790,"node_id":"MDEwOlJlcG9zaXRvcnkxOTg1MTM3OTA=","name":"libra","full_name":"tnowacki/libra","private":false,"owner":{"login":"tnowacki","id":1753366,"node_id":"MDQ6VXNlcjE3NTMzNjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1753366?v=4","gravatar_id":"","url":"https://api.github.com/users/tnowacki","html_url":"https://github.com/tnowacki","followers_url":"https://api.github.com/users/tnowacki/followers","following_url":"https://api.github.com/users/tnowacki/following{/other_user}","gists_url":"https://api.github.com/users/tnowacki/gists{/gist_id}","starred_url":"https://api.github.com/users/tnowacki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnowacki/subscriptions","organizations_url":"https://api.github.com/users/tnowacki/orgs","repos_url":"https://api.github.com/users/tnowacki/repos","events_url":"https://api.github.com/users/tnowacki/events{/privacy}","received_events_url":"https://api.github.com/users/tnowacki/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tnowacki/libra","description":"Libra’s mission is to enable a simple global currency and financial infrastructure that empowers billions of people.","fork":true,"url":"https://api.github.com/repos/tnowacki/libra","forks_url":"https://api.github.com/repos/tnowacki/libra/forks","keys_url":"https://api.github.com/repos/tnowacki/libra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tnowacki/libra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tnowacki/libra/teams","hooks_url":"https://api.github.com/repos/tnowacki/libra/hooks","issue_events_url":"https://api.github.com/repos/tnowacki/libra/issues/events{/number}","events_url":"https://api.github.com/repos/tnowacki/libra/events","assignees_url":"https://api.github.com/repos/tnowacki/libra/assignees{/user}","branches_url":"https://api.github.com/repos/tnowacki/libra/branches{/branch}","tags_url":"https://api.github.com/repos/tnowacki/libra/tags","blobs_url":"https://api.github.com/repos/tnowacki/libra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tnowacki/libra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tnowacki/libra/git/refs{/sha}","trees_url":"https://api.github.com/repos/tnowacki/libra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tnowacki/libra/statuses/{sha}","languages_url":"https://api.github.com/repos/tnowacki/libra/languages","stargazers_url":"https://api.github.com/repos/tnowacki/libra/stargazers","contributors_url":"https://api.github.com/repos/tnowacki/libra/contributors","subscribers_url":"https://api.github.com/repos/tnowacki/libra/subscribers","subscription_url":"https://api.github.com/repos/tnowacki/libra/subscription","commits_url":"https://api.github.com/repos/tnowacki/libra/commits{/sha}","git_commits_url":"https://api.github.com/repos/tnowacki/libra/git/commits{/sha}","comments_url":"https://api.github.com/repos/tnowacki/libra/comments{/number}","issue_comment_url":"https://api.github.com/repos/tnowacki/libra/issues/comments{/number}","contents_url":"https://api.github.com/repos/tnowacki/libra/contents/{+path}","compare_url":"https://api.github.com/repos/tnowacki/libra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tnowacki/libra/merges","archive_url":"https://api.github.com/repos/tnowacki/libra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tnowacki/libra/downloads","issues_url":"https://api.github.com/repos/tnowacki/libra/issues{/number}","pulls_url":"https://api.github.com/repos/tnowacki/libra/pulls{/number}","milestones_url":"https://api.github.com/repos/tnowacki/libra/milestones{/number}","notifications_url":"https://api.github.com/repos/tnowacki/libra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tnowacki/libra/labels{/name}","releases_url":"https://api.github.com/repos/tnowacki/libra/releases{/id}","deployments_url":"https://api.github.com/repos/tnowacki/libra/deployments","created_at":"2019-07-23T21:55:50Z","updated_at":"2019-11-07T17:42:22Z","pushed_at":"2019-11-07T18:01:20Z","git_url":"git://github.com/tnowacki/libra.git","ssh_url":"git@github.com:tnowacki/libra.git","clone_url":"https://github.com/tnowacki/libra.git","svn_url":"https://github.com/tnowacki/libra","homepage":"https://libra.org","size":9454,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"libra:master","ref":"master","sha":"d7e990914ba4d46ffcdd572edc3ec739dc6c2281","user":{"login":"libra","id":48265171,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4MjY1MTcx","avatar_url":"https://avatars1.githubusercontent.com/u/48265171?v=4","gravatar_id":"","url":"https://api.github.com/users/libra","html_url":"https://github.com/libra","followers_url":"https://api.github.com/users/libra/followers","following_url":"https://api.github.com/users/libra/following{/other_user}","gists_url":"https://api.github.com/users/libra/gists{/gist_id}","starred_url":"https://api.github.com/users/libra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libra/subscriptions","organizations_url":"https://api.github.com/users/libra/orgs","repos_url":"https://api.github.com/users/libra/repos","events_url":"https://api.github.com/users/libra/events{/privacy}","received_events_url":"https://api.github.com/users/libra/received_events","type":"Organization","site_admin":false},"repo":{"id":179164257,"node_id":"MDEwOlJlcG9zaXRvcnkxNzkxNjQyNTc=","name":"libra","full_name":"libra/libra","private":false,"owner":{"login":"libra","id":48265171,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4MjY1MTcx","avatar_url":"https://avatars1.githubusercontent.com/u/48265171?v=4","gravatar_id":"","url":"https://api.github.com/users/libra","html_url":"https://github.com/libra","followers_url":"https://api.github.com/users/libra/followers","following_url":"https://api.github.com/users/libra/following{/other_user}","gists_url":"https://api.github.com/users/libra/gists{/gist_id}","starred_url":"https://api.github.com/users/libra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libra/subscriptions","organizations_url":"https://api.github.com/users/libra/orgs","repos_url":"https://api.github.com/users/libra/repos","events_url":"https://api.github.com/users/libra/events{/privacy}","received_events_url":"https://api.github.com/users/libra/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/libra/libra","description":"Libra’s mission is to enable a simple global currency and financial infrastructure that empowers billions of people.","fork":false,"url":"https://api.github.com/repos/libra/libra","forks_url":"https://api.github.com/repos/libra/libra/forks","keys_url":"https://api.github.com/repos/libra/libra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libra/libra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libra/libra/teams","hooks_url":"https://api.github.com/repos/libra/libra/hooks","issue_events_url":"https://api.github.com/repos/libra/libra/issues/events{/number}","events_url":"https://api.github.com/repos/libra/libra/events","assignees_url":"https://api.github.com/repos/libra/libra/assignees{/user}","branches_url":"https://api.github.com/repos/libra/libra/branches{/branch}","tags_url":"https://api.github.com/repos/libra/libra/tags","blobs_url":"https://api.github.com/repos/libra/libra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libra/libra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libra/libra/git/refs{/sha}","trees_url":"https://api.github.com/repos/libra/libra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libra/libra/statuses/{sha}","languages_url":"https://api.github.com/repos/libra/libra/languages","stargazers_url":"https://api.github.com/repos/libra/libra/stargazers","contributors_url":"https://api.github.com/repos/libra/libra/contributors","subscribers_url":"https://api.github.com/repos/libra/libra/subscribers","subscription_url":"https://api.github.com/repos/libra/libra/subscription","commits_url":"https://api.github.com/repos/libra/libra/commits{/sha}","git_commits_url":"https://api.github.com/repos/libra/libra/git/commits{/sha}","comments_url":"https://api.github.com/repos/libra/libra/comments{/number}","issue_comment_url":"https://api.github.com/repos/libra/libra/issues/comments{/number}","contents_url":"https://api.github.com/repos/libra/libra/contents/{+path}","compare_url":"https://api.github.com/repos/libra/libra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libra/libra/merges","archive_url":"https://api.github.com/repos/libra/libra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libra/libra/downloads","issues_url":"https://api.github.com/repos/libra/libra/issues{/number}","pulls_url":"https://api.github.com/repos/libra/libra/pulls{/number}","milestones_url":"https://api.github.com/repos/libra/libra/milestones{/number}","notifications_url":"https://api.github.com/repos/libra/libra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libra/libra/labels{/name}","releases_url":"https://api.github.com/repos/libra/libra/releases{/id}","deployments_url":"https://api.github.com/repos/libra/libra/deployments","created_at":"2019-04-02T21:51:45Z","updated_at":"2019-11-07T19:03:12Z","pushed_at":"2019-11-07T19:06:01Z","git_url":"git://github.com/libra/libra.git","ssh_url":"git@github.com:libra/libra.git","clone_url":"https://github.com/libra/libra.git","svn_url":"https://github.com/libra/libra","homepage":"https://libra.org","size":9426,"stargazers_count":13197,"watchers_count":13197,"language":"Rust","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1943,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":278,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1943,"open_issues":278,"watchers":13197,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libra/libra/pulls/1642"},"html":{"href":"https://github.com/libra/libra/pull/1642"},"issue":{"href":"https://api.github.com/repos/libra/libra/issues/1642"},"comments":{"href":"https://api.github.com/repos/libra/libra/issues/1642/comments"},"review_comments":{"href":"https://api.github.com/repos/libra/libra/pulls/1642/comments"},"review_comment":{"href":"https://api.github.com/repos/libra/libra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libra/libra/pulls/1642/commits"},"statuses":{"href":"https://api.github.com/repos/libra/libra/statuses/059c9aca44f8f25c3f4004576c15482820b48efb"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tnowacki"}}