GitHub PullRequestReviewCommentEvent at 2014-11-23 21:17:10
Repository: rust
Actor: japaric
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/20768015","id":20768015,"diff_hunk":"@@ -512,7 +513,7 @@ pub trait GraphWalk<'a, N, E> {\n \n /// Renders directed graph `g` into the writer `w` in DOT syntax.\n /// (Main entry point for the library.)\n-pub fn render<'a, N:'a, E:'a, G:Labeller<'a,N,E>+GraphWalk<'a,N,E>, W:Writer>(\n+pub fn render<'a, N:Clone+'a, E:Clone+'a, G:Labeller<'a,N,E>+GraphWalk<'a,N,E>, W:Writer>(","path":"src/libgraphviz/lib.rs","position":180,"original_position":180,"commit_id":"96ca7b5e746c6eca0ba88f59654d90acd3083e5f","original_commit_id":"96ca7b5e746c6eca0ba88f59654d90acd3083e5f","user":{"login":"japaric","id":5018213,"avatar_url":"https://avatars.githubusercontent.com/u/5018213?v=3","gravatar_id":"","url":"https://api.github.com/users/japaric","html_url":"https://github.com/japaric","followers_url":"https://api.github.com/users/japaric/followers","following_url":"https://api.github.com/users/japaric/following{/other_user}","gists_url":"https://api.github.com/users/japaric/gists{/gist_id}","starred_url":"https://api.github.com/users/japaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japaric/subscriptions","organizations_url":"https://api.github.com/users/japaric/orgs","repos_url":"https://api.github.com/users/japaric/repos","events_url":"https://api.github.com/users/japaric/events{/privacy}","received_events_url":"https://api.github.com/users/japaric/received_events","type":"User","site_admin":false},"body":"I was forced to add the `Clone` bound here because the `T` in `CowVec<T>` needs to be cloneable. Not sure how bad this could be.","created_at":"2014-11-23T21:17:10Z","updated_at":"2014-11-23T21:17:10Z","html_url":"https://github.com/rust-lang/rust/pull/19252#discussion_r20768015","pull_request_url":"https://api.github.com/repos/rust-lang/rust/pulls/19252","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/20768015"},"html":{"href":"https://github.com/rust-lang/rust/pull/19252#discussion_r20768015"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/19252"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/19252","id":24906668,"html_url":"https://github.com/rust-lang/rust/pull/19252","diff_url":"https://github.com/rust-lang/rust/pull/19252.diff","patch_url":"https://github.com/rust-lang/rust/pull/19252.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/19252","number":19252,"state":"open","locked":false,"title":"[WIP] Deprecate MaybeOwned[Vector] in favor of Cow","user":{"login":"japaric","id":5018213,"avatar_url":"https://avatars.githubusercontent.com/u/5018213?v=3","gravatar_id":"","url":"https://api.github.com/users/japaric","html_url":"https://github.com/japaric","followers_url":"https://api.github.com/users/japaric/followers","following_url":"https://api.github.com/users/japaric/following{/other_user}","gists_url":"https://api.github.com/users/japaric/gists{/gist_id}","starred_url":"https://api.github.com/users/japaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japaric/subscriptions","organizations_url":"https://api.github.com/users/japaric/orgs","repos_url":"https://api.github.com/users/japaric/repos","events_url":"https://api.github.com/users/japaric/events{/privacy}","received_events_url":"https://api.github.com/users/japaric/received_events","type":"User","site_admin":false},"body":"- Add `IntoCow` trait\r\n- Add `CowString`/`CowVec` type aliases (to `Cow<'_, String, str>`/`Cow<'_, Vec, [T]>` respectively)\r\n- `Cow` implements: `Show`, `Hash`, `[Partial]{Eq,Ord}`\r\n\r\n[breaking-change]s:\r\n\r\n- libcollections: `SendStr` is now an alias to `CowString<'static>` (it was aliased to `MaybeOwned<'static>`)\r\n- libgraphviz:\r\n  - `LabelText` variants wrap `CowString` instead of `MaybeOwned`\r\n  - `Nodes` and `Edges` are now type aliases to `CowVec` (they were aliased to `MaybeOwnedVec`)\r\n- These functions now accept/return `Cow` instead of `MaybeOwned[Vector]`:\r\n  - libregex: `Replacer::reg_replace`\r\n  - libcollections: `str::from_utf8_lossy`\r\n  - libgraphviz: `Id::new`, `Id::name`, `LabelText::pre_escaped_content`\r\n  - libstd: `TaskBuilder::named`\r\n\r\n---\r\n\r\nLeft to do:\r\n- Mark `MaybeOwned[Vector]` as deprecated\r\n- Fix the docs where it may have gone wrong\r\n\r\nOther things that we may want to do:\r\n- Add `IntoCow` to the prelude (since `IntoMaybeOwned` is in the prelude)\r\n- Add `is_owned`/`is_borrowed` inherent methods to `Cow` (`MaybeOwned` has these methods)\r\n\r\ncc @aturon ","created_at":"2014-11-23T21:15:55Z","updated_at":"2014-11-23T21:17:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a121c21a6ebc8395325942995ac4e19e62fa939","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/19252/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/19252/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/19252/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/96ca7b5e746c6eca0ba88f59654d90acd3083e5f","head":{"label":"japaric:cow","ref":"cow","sha":"96ca7b5e746c6eca0ba88f59654d90acd3083e5f","user":{"login":"japaric","id":5018213,"avatar_url":"https://avatars.githubusercontent.com/u/5018213?v=3","gravatar_id":"","url":"https://api.github.com/users/japaric","html_url":"https://github.com/japaric","followers_url":"https://api.github.com/users/japaric/followers","following_url":"https://api.github.com/users/japaric/following{/other_user}","gists_url":"https://api.github.com/users/japaric/gists{/gist_id}","starred_url":"https://api.github.com/users/japaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japaric/subscriptions","organizations_url":"https://api.github.com/users/japaric/orgs","repos_url":"https://api.github.com/users/japaric/repos","events_url":"https://api.github.com/users/japaric/events{/privacy}","received_events_url":"https://api.github.com/users/japaric/received_events","type":"User","site_admin":false},"repo":{"id":17873870,"name":"rust","full_name":"japaric/rust","owner":{"login":"japaric","id":5018213,"avatar_url":"https://avatars.githubusercontent.com/u/5018213?v=3","gravatar_id":"","url":"https://api.github.com/users/japaric","html_url":"https://github.com/japaric","followers_url":"https://api.github.com/users/japaric/followers","following_url":"https://api.github.com/users/japaric/following{/other_user}","gists_url":"https://api.github.com/users/japaric/gists{/gist_id}","starred_url":"https://api.github.com/users/japaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japaric/subscriptions","organizations_url":"https://api.github.com/users/japaric/orgs","repos_url":"https://api.github.com/users/japaric/repos","events_url":"https://api.github.com/users/japaric/events{/privacy}","received_events_url":"https://api.github.com/users/japaric/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/japaric/rust","description":"a safe, concurrent, practical language","fork":true,"url":"https://api.github.com/repos/japaric/rust","forks_url":"https://api.github.com/repos/japaric/rust/forks","keys_url":"https://api.github.com/repos/japaric/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/japaric/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/japaric/rust/teams","hooks_url":"https://api.github.com/repos/japaric/rust/hooks","issue_events_url":"https://api.github.com/repos/japaric/rust/issues/events{/number}","events_url":"https://api.github.com/repos/japaric/rust/events","assignees_url":"https://api.github.com/repos/japaric/rust/assignees{/user}","branches_url":"https://api.github.com/repos/japaric/rust/branches{/branch}","tags_url":"https://api.github.com/repos/japaric/rust/tags","blobs_url":"https://api.github.com/repos/japaric/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/japaric/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/japaric/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/japaric/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/japaric/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/japaric/rust/languages","stargazers_url":"https://api.github.com/repos/japaric/rust/stargazers","contributors_url":"https://api.github.com/repos/japaric/rust/contributors","subscribers_url":"https://api.github.com/repos/japaric/rust/subscribers","subscription_url":"https://api.github.com/repos/japaric/rust/subscription","commits_url":"https://api.github.com/repos/japaric/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/japaric/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/japaric/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/japaric/rust/issues/comments/{number}","contents_url":"https://api.github.com/repos/japaric/rust/contents/{+path}","compare_url":"https://api.github.com/repos/japaric/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/japaric/rust/merges","archive_url":"https://api.github.com/repos/japaric/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/japaric/rust/downloads","issues_url":"https://api.github.com/repos/japaric/rust/issues{/number}","pulls_url":"https://api.github.com/repos/japaric/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/japaric/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/japaric/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/japaric/rust/labels{/name}","releases_url":"https://api.github.com/repos/japaric/rust/releases{/id}","created_at":"2014-03-18T16:51:45Z","updated_at":"2014-11-23T17:55:11Z","pushed_at":"2014-11-23T20:45:43Z","git_url":"git://github.com/japaric/rust.git","ssh_url":"git@github.com:japaric/rust.git","clone_url":"https://github.com/japaric/rust.git","svn_url":"https://github.com/japaric/rust","homepage":"http://www.rust-lang.org","size":186655,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"220b99b148559e8996a1dbd279e8ca190bf94b2e","user":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":724712,"name":"rust","full_name":"rust-lang/rust","owner":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang/rust","description":"a safe, concurrent, practical language","fork":false,"url":"https://api.github.com/repos/rust-lang/rust","forks_url":"https://api.github.com/repos/rust-lang/rust/forks","keys_url":"https://api.github.com/repos/rust-lang/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rust/teams","hooks_url":"https://api.github.com/repos/rust-lang/rust/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rust/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rust/events","assignees_url":"https://api.github.com/repos/rust-lang/rust/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rust/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rust/tags","blobs_url":"https://api.github.com/repos/rust-lang/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rust/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rust/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rust/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rust/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rust/subscription","commits_url":"https://api.github.com/repos/rust-lang/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rust/issues/comments/{number}","contents_url":"https://api.github.com/repos/rust-lang/rust/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rust/merges","archive_url":"https://api.github.com/repos/rust-lang/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rust/downloads","issues_url":"https://api.github.com/repos/rust-lang/rust/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rust/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rust/releases{/id}","created_at":"2010-06-16T20:39:03Z","updated_at":"2014-11-23T20:31:42Z","pushed_at":"2014-11-23T20:26:58Z","git_url":"git://github.com/rust-lang/rust.git","ssh_url":"git@github.com:rust-lang/rust.git","clone_url":"https://github.com/rust-lang/rust.git","svn_url":"https://github.com/rust-lang/rust","homepage":"http://www.rust-lang.org","size":534095,"stargazers_count":7517,"watchers_count":7517,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1459,"mirror_url":null,"open_issues_count":2175,"forks":1459,"open_issues":2175,"watchers":7517,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/19252"},"html":{"href":"https://github.com/rust-lang/rust/pull/19252"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/19252"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/19252/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/19252/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/19252/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/96ca7b5e746c6eca0ba88f59654d90acd3083e5f"}}}}