{"action":"created","comment":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments/56418837","id":56418837,"diff_hunk":"@@ -891,6 +891,7 @@ unittest\n \n     move(obj2, obj3);\n     assert(obj3 is obj1);\n+    assert(obj2 is obj1);","path":"std/algorithm/mutation.d","position":4,"original_position":4,"commit_id":"d2e924d42715fff82188c296437639d22956757d","original_commit_id":"d2e924d42715fff82188c296437639d22956757d","user":{"login":"ntrel","id":1107820,"avatar_url":"https://avatars.githubusercontent.com/u/1107820?v=3","gravatar_id":"","url":"https://api.github.com/users/ntrel","html_url":"https://github.com/ntrel","followers_url":"https://api.github.com/users/ntrel/followers","following_url":"https://api.github.com/users/ntrel/following{/other_user}","gists_url":"https://api.github.com/users/ntrel/gists{/gist_id}","starred_url":"https://api.github.com/users/ntrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntrel/subscriptions","organizations_url":"https://api.github.com/users/ntrel/orgs","repos_url":"https://api.github.com/users/ntrel/repos","events_url":"https://api.github.com/users/ntrel/events{/privacy}","received_events_url":"https://api.github.com/users/ntrel/received_events","type":"User","site_admin":false},"body":"See here: https://github.com/ntrel/phobos/blob/move-docs/std/algorithm/mutation.d#L1206\r\n\r\n`move` forwards to `moveEmplace` for the real work. Notice `source` only gets cleared if it's a struct with an elaborate destructor or elaborate postblit, otherwise source is left unchanged. I think the docs could make this clearer. The user needs to understand that a copy is made unless this would cause problems, and only then is a true move made. That's why I added the assert.\r\n\r\n(Personally I would prefer a true move is always made to avoid holding on to GC memory accidentally).","created_at":"2016-03-16T21:29:34Z","updated_at":"2016-03-16T21:29:34Z","html_url":"https://github.com/D-Programming-Language/phobos/pull/4084#discussion_r56418837","pull_request_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/4084","_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments/56418837"},"html":{"href":"https://github.com/D-Programming-Language/phobos/pull/4084#discussion_r56418837"},"pull_request":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/4084"}}},"pull_request":{"url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/4084","id":62903520,"html_url":"https://github.com/D-Programming-Language/phobos/pull/4084","diff_url":"https://github.com/D-Programming-Language/phobos/pull/4084.diff","patch_url":"https://github.com/D-Programming-Language/phobos/pull/4084.patch","issue_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/4084","number":4084,"state":"open","locked":false,"title":"Tweak std.algorithm.mutation.move, moveEmplace examples","user":{"login":"ntrel","id":1107820,"avatar_url":"https://avatars.githubusercontent.com/u/1107820?v=3","gravatar_id":"","url":"https://api.github.com/users/ntrel","html_url":"https://github.com/ntrel","followers_url":"https://api.github.com/users/ntrel/followers","following_url":"https://api.github.com/users/ntrel/following{/other_user}","gists_url":"https://api.github.com/users/ntrel/gists{/gist_id}","starred_url":"https://api.github.com/users/ntrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntrel/subscriptions","organizations_url":"https://api.github.com/users/ntrel/orgs","repos_url":"https://api.github.com/users/ntrel/repos","events_url":"https://api.github.com/users/ntrel/events{/privacy}","received_events_url":"https://api.github.com/users/ntrel/received_events","type":"User","site_admin":false},"body":"Should now be easier to read and/or a bit clearer.","created_at":"2016-03-15T13:18:08Z","updated_at":"2016-03-16T21:29:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a89a9f035538b659c9917c327714fed97b8eff2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/4084/commits","review_comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/4084/comments","review_comment_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/4084/comments","statuses_url":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/d2e924d42715fff82188c296437639d22956757d","head":{"label":"ntrel:move-docs","ref":"move-docs","sha":"d2e924d42715fff82188c296437639d22956757d","user":{"login":"ntrel","id":1107820,"avatar_url":"https://avatars.githubusercontent.com/u/1107820?v=3","gravatar_id":"","url":"https://api.github.com/users/ntrel","html_url":"https://github.com/ntrel","followers_url":"https://api.github.com/users/ntrel/followers","following_url":"https://api.github.com/users/ntrel/following{/other_user}","gists_url":"https://api.github.com/users/ntrel/gists{/gist_id}","starred_url":"https://api.github.com/users/ntrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntrel/subscriptions","organizations_url":"https://api.github.com/users/ntrel/orgs","repos_url":"https://api.github.com/users/ntrel/repos","events_url":"https://api.github.com/users/ntrel/events{/privacy}","received_events_url":"https://api.github.com/users/ntrel/received_events","type":"User","site_admin":false},"repo":{"id":2997412,"name":"phobos","full_name":"ntrel/phobos","owner":{"login":"ntrel","id":1107820,"avatar_url":"https://avatars.githubusercontent.com/u/1107820?v=3","gravatar_id":"","url":"https://api.github.com/users/ntrel","html_url":"https://github.com/ntrel","followers_url":"https://api.github.com/users/ntrel/followers","following_url":"https://api.github.com/users/ntrel/following{/other_user}","gists_url":"https://api.github.com/users/ntrel/gists{/gist_id}","starred_url":"https://api.github.com/users/ntrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntrel/subscriptions","organizations_url":"https://api.github.com/users/ntrel/orgs","repos_url":"https://api.github.com/users/ntrel/repos","events_url":"https://api.github.com/users/ntrel/events{/privacy}","received_events_url":"https://api.github.com/users/ntrel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ntrel/phobos","description":"Runtime library for the D programming language","fork":true,"url":"https://api.github.com/repos/ntrel/phobos","forks_url":"https://api.github.com/repos/ntrel/phobos/forks","keys_url":"https://api.github.com/repos/ntrel/phobos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ntrel/phobos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ntrel/phobos/teams","hooks_url":"https://api.github.com/repos/ntrel/phobos/hooks","issue_events_url":"https://api.github.com/repos/ntrel/phobos/issues/events{/number}","events_url":"https://api.github.com/repos/ntrel/phobos/events","assignees_url":"https://api.github.com/repos/ntrel/phobos/assignees{/user}","branches_url":"https://api.github.com/repos/ntrel/phobos/branches{/branch}","tags_url":"https://api.github.com/repos/ntrel/phobos/tags","blobs_url":"https://api.github.com/repos/ntrel/phobos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ntrel/phobos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ntrel/phobos/git/refs{/sha}","trees_url":"https://api.github.com/repos/ntrel/phobos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ntrel/phobos/statuses/{sha}","languages_url":"https://api.github.com/repos/ntrel/phobos/languages","stargazers_url":"https://api.github.com/repos/ntrel/phobos/stargazers","contributors_url":"https://api.github.com/repos/ntrel/phobos/contributors","subscribers_url":"https://api.github.com/repos/ntrel/phobos/subscribers","subscription_url":"https://api.github.com/repos/ntrel/phobos/subscription","commits_url":"https://api.github.com/repos/ntrel/phobos/commits{/sha}","git_commits_url":"https://api.github.com/repos/ntrel/phobos/git/commits{/sha}","comments_url":"https://api.github.com/repos/ntrel/phobos/comments{/number}","issue_comment_url":"https://api.github.com/repos/ntrel/phobos/issues/comments{/number}","contents_url":"https://api.github.com/repos/ntrel/phobos/contents/{+path}","compare_url":"https://api.github.com/repos/ntrel/phobos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ntrel/phobos/merges","archive_url":"https://api.github.com/repos/ntrel/phobos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ntrel/phobos/downloads","issues_url":"https://api.github.com/repos/ntrel/phobos/issues{/number}","pulls_url":"https://api.github.com/repos/ntrel/phobos/pulls{/number}","milestones_url":"https://api.github.com/repos/ntrel/phobos/milestones{/number}","notifications_url":"https://api.github.com/repos/ntrel/phobos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ntrel/phobos/labels{/name}","releases_url":"https://api.github.com/repos/ntrel/phobos/releases{/id}","deployments_url":"https://api.github.com/repos/ntrel/phobos/deployments","created_at":"2011-12-16T20:17:31Z","updated_at":"2014-08-21T11:07:03Z","pushed_at":"2016-03-15T13:15:38Z","git_url":"git://github.com/ntrel/phobos.git","ssh_url":"git@github.com:ntrel/phobos.git","clone_url":"https://github.com/ntrel/phobos.git","svn_url":"https://github.com/ntrel/phobos","homepage":"d-programming-language.org","size":50499,"stargazers_count":1,"watchers_count":1,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"D-Programming-Language:master","ref":"master","sha":"8db556f749787dda5eff77cafeaa66c43fa02989","user":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"repo":{"id":1257084,"name":"phobos","full_name":"D-Programming-Language/phobos","owner":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/D-Programming-Language/phobos","description":"The standard library of the D programming language","fork":false,"url":"https://api.github.com/repos/D-Programming-Language/phobos","forks_url":"https://api.github.com/repos/D-Programming-Language/phobos/forks","keys_url":"https://api.github.com/repos/D-Programming-Language/phobos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/D-Programming-Language/phobos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/D-Programming-Language/phobos/teams","hooks_url":"https://api.github.com/repos/D-Programming-Language/phobos/hooks","issue_events_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/events{/number}","events_url":"https://api.github.com/repos/D-Programming-Language/phobos/events","assignees_url":"https://api.github.com/repos/D-Programming-Language/phobos/assignees{/user}","branches_url":"https://api.github.com/repos/D-Programming-Language/phobos/branches{/branch}","tags_url":"https://api.github.com/repos/D-Programming-Language/phobos/tags","blobs_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/refs{/sha}","trees_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/{sha}","languages_url":"https://api.github.com/repos/D-Programming-Language/phobos/languages","stargazers_url":"https://api.github.com/repos/D-Programming-Language/phobos/stargazers","contributors_url":"https://api.github.com/repos/D-Programming-Language/phobos/contributors","subscribers_url":"https://api.github.com/repos/D-Programming-Language/phobos/subscribers","subscription_url":"https://api.github.com/repos/D-Programming-Language/phobos/subscription","commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/commits{/sha}","git_commits_url":"https://api.github.com/repos/D-Programming-Language/phobos/git/commits{/sha}","comments_url":"https://api.github.com/repos/D-Programming-Language/phobos/comments{/number}","issue_comment_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues/comments{/number}","contents_url":"https://api.github.com/repos/D-Programming-Language/phobos/contents/{+path}","compare_url":"https://api.github.com/repos/D-Programming-Language/phobos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/D-Programming-Language/phobos/merges","archive_url":"https://api.github.com/repos/D-Programming-Language/phobos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/D-Programming-Language/phobos/downloads","issues_url":"https://api.github.com/repos/D-Programming-Language/phobos/issues{/number}","pulls_url":"https://api.github.com/repos/D-Programming-Language/phobos/pulls{/number}","milestones_url":"https://api.github.com/repos/D-Programming-Language/phobos/milestones{/number}","notifications_url":"https://api.github.com/repos/D-Programming-Language/phobos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/D-Programming-Language/phobos/labels{/name}","releases_url":"https://api.github.com/repos/D-Programming-Language/phobos/releases{/id}","deployments_url":"https://api.github.com/repos/D-Programming-Language/phobos/deployments","created_at":"2011-01-15T07:00:06Z","updated_at":"2016-03-14T18:40:23Z","pushed_at":"2016-03-16T20:57:57Z","git_url":"git://github.com/D-Programming-Language/phobos.git","ssh_url":"git@github.com:D-Programming-Language/phobos.git","clone_url":"https://github.com/D-Programming-Language/phobos.git","svn_url":"https://github.com/D-Programming-Language/phobos","homepage":"dlang.org/phobos","size":70288,"stargazers_count":686,"watchers_count":686,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":464,"mirror_url":null,"open_issues_count":94,"forks":464,"open_issues":94,"watchers":686,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/4084"},"html":{"href":"https://github.com/D-Programming-Language/phobos/pull/4084"},"issue":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/issues/4084"},"comments":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/issues/4084/comments"},"review_comments":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/4084/comments"},"review_comment":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/pulls/4084/commits"},"statuses":{"href":"https://api.github.com/repos/D-Programming-Language/phobos/statuses/d2e924d42715fff82188c296437639d22956757d"}}}}