GitHub PullRequestReviewCommentEvent at 2014-02-16 08:38:50
Repository: rust
Actor: huonw
Payload: {"comment":{"url":"https://api.github.com/repos/mozilla/rust/pulls/comments/9776264","id":9776264,"diff_hunk":"@@ -500,15 +500,15 @@ impl<K: Clone + TotalOrd, V: Clone> Branch<K, V> {\n                     let new_outcome = self.clone().rightmost_child.insert(k.clone(),\n                                                                        v.clone(),\n                                                                        ub.clone());\n-                    new_branch = new_outcome.clone().n0();\n-                    outcome = new_outcome.n1();\n+                    new_branch = new_outcome.get_0().clone();\n+                    outcome = new_outcome.get_1().clone();","path":"src/libcollections/btree.rs","position":7,"original_position":7,"commit_id":"3a2f60ea3ad38e0db25c03da975e15aadee403bf","original_commit_id":"3a2f60ea3ad38e0db25c03da975e15aadee403bf","user":{"login":"huonw","id":1203825,"avatar_url":"https://gravatar.com/avatar/365f3c2704e4744e237651f3c2a7c411?d=https%3A%2F%2Fidenticons.github.com%2Ffd04754df99d685827696fc1e66db286.png&r=x","gravatar_id":"365f3c2704e4744e237651f3c2a7c411","url":"https://api.github.com/users/huonw","html_url":"https://github.com/huonw","followers_url":"https://api.github.com/users/huonw/followers","following_url":"https://api.github.com/users/huonw/following{/other_user}","gists_url":"https://api.github.com/users/huonw/gists{/gist_id}","starred_url":"https://api.github.com/users/huonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huonw/subscriptions","organizations_url":"https://api.github.com/users/huonw/orgs","repos_url":"https://api.github.com/users/huonw/repos","events_url":"https://api.github.com/users/huonw/events{/privacy}","received_events_url":"https://api.github.com/users/huonw/received_events","type":"User","site_admin":false},"body":"You're adding extra clones here (not that it matters much given how *many* clones are in this file), it should really be\r\n\r\n```rust\r\nlet (next_branch, next_outcome) = self.clone().rightmost_child.insert(...) ;\r\nnew_branch = next_branch;\r\noutcome = next_outcome;\r\n```\r\n\r\nto avoid the clones. (And below too)","created_at":"2014-02-16T08:38:50Z","updated_at":"2014-02-16T08:38:50Z","html_url":"https://github.com/mozilla/rust/pull/12313#discussion_r9776264","pull_request_url":"https://api.github.com/repos/mozilla/rust/pulls/12313","_links":{"self":{"href":"https://api.github.com/repos/mozilla/rust/pulls/comments/9776264"},"html":{"href":"https://github.com/mozilla/rust/pull/12313#discussion_r9776264"},"pull_request":{"href":"https://api.github.com/repos/mozilla/rust/pulls/12313"}}}}