GitHub PullRequestReviewCommentEvent at 2014-12-03 07:00:03
Repository: cargo
Actor: alexcrichton
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/cargo/pulls/comments/21215076","id":21215076,"diff_hunk":"@@ -30,14 +29,11 @@ impl Drop for Profiler {\n     fn drop(&mut self) {\n         if !enabled() { return }\n \n-        let mut stack = PROFILE_STACK.replace(None).unwrap_or(Vec::new());\n-        let mut msgs = MESSAGES.replace(None).unwrap_or(Vec::new());\n-\n-        let start = stack.pop().unwrap();\n+        let start = PROFILE_STACK.with(|ref mut stack| stack.borrow_mut().pop().unwrap());\n         let end = time::precise_time_ns();\n \n-        let msg = mem::replace(&mut self.desc, String::new());\n-        if stack.len() == 0 {\n+        let stack_len = PROFILE_STACK.with(|ref stack| stack.borrow().len());","path":"src/cargo/util/profile.rs","position":37,"original_position":37,"commit_id":"26708d62882e44c592b596961e18b902caaa7574","original_commit_id":"26708d62882e44c592b596961e18b902caaa7574","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"body":"I don't think you need this `ref` because `stack` is already a reference (same with `ref mut` above)","created_at":"2014-12-03T07:00:03Z","updated_at":"2014-12-03T07:00:03Z","html_url":"https://github.com/rust-lang/cargo/pull/1003#discussion_r21215076","pull_request_url":"https://api.github.com/repos/rust-lang/cargo/pulls/1003","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/cargo/pulls/comments/21215076"},"html":{"href":"https://github.com/rust-lang/cargo/pull/1003#discussion_r21215076"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/cargo/pulls/1003"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/cargo/pulls/1003","id":25398431,"html_url":"https://github.com/rust-lang/cargo/pull/1003","diff_url":"https://github.com/rust-lang/cargo/pull/1003.diff","patch_url":"https://github.com/rust-lang/cargo/pull/1003.patch","issue_url":"https://api.github.com/repos/rust-lang/cargo/issues/1003","number":1003,"state":"open","locked":false,"title":"Update for nightly","user":{"login":"jmesmon","id":103437,"avatar_url":"https://avatars.githubusercontent.com/u/103437?v=3","gravatar_id":"","url":"https://api.github.com/users/jmesmon","html_url":"https://github.com/jmesmon","followers_url":"https://api.github.com/users/jmesmon/followers","following_url":"https://api.github.com/users/jmesmon/following{/other_user}","gists_url":"https://api.github.com/users/jmesmon/gists{/gist_id}","starred_url":"https://api.github.com/users/jmesmon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmesmon/subscriptions","organizations_url":"https://api.github.com/users/jmesmon/orgs","repos_url":"https://api.github.com/users/jmesmon/repos","events_url":"https://api.github.com/users/jmesmon/events{/privacy}","received_events_url":"https://api.github.com/users/jmesmon/received_events","type":"User","site_admin":false},"body":"I'm a bit shaky on the profile.rs changes (`thread_local!` and `RefCell` relplacing `local_data_key!`), do make sure I haven't royally screwed something up there.","created_at":"2014-12-03T06:19:40Z","updated_at":"2014-12-03T07:00:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b425f2af34fd3262a9dbf654a5c575c0c4aa7d59","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/cargo/pulls/1003/commits","review_comments_url":"https://api.github.com/repos/rust-lang/cargo/pulls/1003/comments","review_comment_url":"https://api.github.com/repos/rust-lang/cargo/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rust-lang/cargo/issues/1003/comments","statuses_url":"https://api.github.com/repos/rust-lang/cargo/statuses/26708d62882e44c592b596961e18b902caaa7574","head":{"label":"jmesmon:update-for-nightly","ref":"update-for-nightly","sha":"26708d62882e44c592b596961e18b902caaa7574","user":{"login":"jmesmon","id":103437,"avatar_url":"https://avatars.githubusercontent.com/u/103437?v=3","gravatar_id":"","url":"https://api.github.com/users/jmesmon","html_url":"https://github.com/jmesmon","followers_url":"https://api.github.com/users/jmesmon/followers","following_url":"https://api.github.com/users/jmesmon/following{/other_user}","gists_url":"https://api.github.com/users/jmesmon/gists{/gist_id}","starred_url":"https://api.github.com/users/jmesmon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmesmon/subscriptions","organizations_url":"https://api.github.com/users/jmesmon/orgs","repos_url":"https://api.github.com/users/jmesmon/repos","events_url":"https://api.github.com/users/jmesmon/events{/privacy}","received_events_url":"https://api.github.com/users/jmesmon/received_events","type":"User","site_admin":false},"repo":{"id":25610812,"name":"cargo","full_name":"jmesmon/cargo","owner":{"login":"jmesmon","id":103437,"avatar_url":"https://avatars.githubusercontent.com/u/103437?v=3","gravatar_id":"","url":"https://api.github.com/users/jmesmon","html_url":"https://github.com/jmesmon","followers_url":"https://api.github.com/users/jmesmon/followers","following_url":"https://api.github.com/users/jmesmon/following{/other_user}","gists_url":"https://api.github.com/users/jmesmon/gists{/gist_id}","starred_url":"https://api.github.com/users/jmesmon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmesmon/subscriptions","organizations_url":"https://api.github.com/users/jmesmon/orgs","repos_url":"https://api.github.com/users/jmesmon/repos","events_url":"https://api.github.com/users/jmesmon/events{/privacy}","received_events_url":"https://api.github.com/users/jmesmon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmesmon/cargo","description":"The Rust package manager","fork":true,"url":"https://api.github.com/repos/jmesmon/cargo","forks_url":"https://api.github.com/repos/jmesmon/cargo/forks","keys_url":"https://api.github.com/repos/jmesmon/cargo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmesmon/cargo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmesmon/cargo/teams","hooks_url":"https://api.github.com/repos/jmesmon/cargo/hooks","issue_events_url":"https://api.github.com/repos/jmesmon/cargo/issues/events{/number}","events_url":"https://api.github.com/repos/jmesmon/cargo/events","assignees_url":"https://api.github.com/repos/jmesmon/cargo/assignees{/user}","branches_url":"https://api.github.com/repos/jmesmon/cargo/branches{/branch}","tags_url":"https://api.github.com/repos/jmesmon/cargo/tags","blobs_url":"https://api.github.com/repos/jmesmon/cargo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmesmon/cargo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmesmon/cargo/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmesmon/cargo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmesmon/cargo/statuses/{sha}","languages_url":"https://api.github.com/repos/jmesmon/cargo/languages","stargazers_url":"https://api.github.com/repos/jmesmon/cargo/stargazers","contributors_url":"https://api.github.com/repos/jmesmon/cargo/contributors","subscribers_url":"https://api.github.com/repos/jmesmon/cargo/subscribers","subscription_url":"https://api.github.com/repos/jmesmon/cargo/subscription","commits_url":"https://api.github.com/repos/jmesmon/cargo/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmesmon/cargo/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmesmon/cargo/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmesmon/cargo/issues/comments/{number}","contents_url":"https://api.github.com/repos/jmesmon/cargo/contents/{+path}","compare_url":"https://api.github.com/repos/jmesmon/cargo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmesmon/cargo/merges","archive_url":"https://api.github.com/repos/jmesmon/cargo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmesmon/cargo/downloads","issues_url":"https://api.github.com/repos/jmesmon/cargo/issues{/number}","pulls_url":"https://api.github.com/repos/jmesmon/cargo/pulls{/number}","milestones_url":"https://api.github.com/repos/jmesmon/cargo/milestones{/number}","notifications_url":"https://api.github.com/repos/jmesmon/cargo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmesmon/cargo/labels{/name}","releases_url":"https://api.github.com/repos/jmesmon/cargo/releases{/id}","created_at":"2014-10-23T00:18:22Z","updated_at":"2014-10-22T22:14:39Z","pushed_at":"2014-12-03T06:46:36Z","git_url":"git://github.com/jmesmon/cargo.git","ssh_url":"git@github.com:jmesmon/cargo.git","clone_url":"https://github.com/jmesmon/cargo.git","svn_url":"https://github.com/jmesmon/cargo","homepage":"http://crates.io/","size":3753,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"5a80c023690bc6171eccadcc49075d1b3edec8ce","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":17420913,"name":"cargo","full_name":"rust-lang/cargo","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/cargo","description":"The Rust package manager","fork":false,"url":"https://api.github.com/repos/rust-lang/cargo","forks_url":"https://api.github.com/repos/rust-lang/cargo/forks","keys_url":"https://api.github.com/repos/rust-lang/cargo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/cargo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/cargo/teams","hooks_url":"https://api.github.com/repos/rust-lang/cargo/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/cargo/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/cargo/events","assignees_url":"https://api.github.com/repos/rust-lang/cargo/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/cargo/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/cargo/tags","blobs_url":"https://api.github.com/repos/rust-lang/cargo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/cargo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/cargo/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/cargo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/cargo/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/cargo/languages","stargazers_url":"https://api.github.com/repos/rust-lang/cargo/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/cargo/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/cargo/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/cargo/subscription","commits_url":"https://api.github.com/repos/rust-lang/cargo/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/cargo/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/cargo/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/cargo/issues/comments/{number}","contents_url":"https://api.github.com/repos/rust-lang/cargo/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/cargo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/cargo/merges","archive_url":"https://api.github.com/repos/rust-lang/cargo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/cargo/downloads","issues_url":"https://api.github.com/repos/rust-lang/cargo/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/cargo/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/cargo/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/cargo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/cargo/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/cargo/releases{/id}","created_at":"2014-03-04T23:20:42Z","updated_at":"2014-12-02T23:40:02Z","pushed_at":"2014-12-02T09:06:48Z","git_url":"git://github.com/rust-lang/cargo.git","ssh_url":"git@github.com:rust-lang/cargo.git","clone_url":"https://github.com/rust-lang/cargo.git","svn_url":"https://github.com/rust-lang/cargo","homepage":"http://crates.io/","size":29392,"stargazers_count":761,"watchers_count":761,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":139,"mirror_url":null,"open_issues_count":115,"forks":139,"open_issues":115,"watchers":761,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/cargo/pulls/1003"},"html":{"href":"https://github.com/rust-lang/cargo/pull/1003"},"issue":{"href":"https://api.github.com/repos/rust-lang/cargo/issues/1003"},"comments":{"href":"https://api.github.com/repos/rust-lang/cargo/issues/1003/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/cargo/pulls/1003/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/cargo/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/cargo/pulls/1003/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/cargo/statuses/26708d62882e44c592b596961e18b902caaa7574"}}}}