{"action":"created","comment":{"url":"https://api.github.com/repos/iwburns/id-tree/pulls/comments/92658575","pull_request_review_id":13178612,"id":92658575,"diff_hunk":"@@ -331,24 +331,15 @@ impl<T> Tree<T> {\n             return Result::Err(error.expect(\"Tree::remove_node_lift_children: Missing an error value on finding an invalid NodeId.\"));\n         }\n \n-        if !self.node_has_parent(&node_id) {\n-            self.clear_parent_of_children(&node_id);\n-        } else {\n-            let parent_id = self.get_unsafe(&node_id)\n-                .parent()\n-                .expect(\"Tree::remove_node_lift_children: node_has_parent() is true, but unwrapping said parent failed.\")\n-                .clone();\n-\n-            let children = self.get_unsafe(&node_id)\n-                .children()\n-                .clone();\n-\n-            for child_id in children {\n+        if let Some(parent_id) = self.get_unsafe(&node_id).parent().cloned() {\n+            //attach children to parent\n+            for child_id in self.get_unsafe(&node_id).children().clone() {\n                 self.set_as_parent_and_child(&parent_id, &child_id);\n             }\n+        } else {\n+            self.clear_parent_of_children(&node_id);","path":"src/tree.rs","position":23,"original_position":23,"commit_id":"26d053c0af61857b07ca4015c546c5584f85400e","original_commit_id":"26d053c0af61857b07ca4015c546c5584f85400e","user":{"login":"Drakulix","id":4404502,"avatar_url":"https://avatars.githubusercontent.com/u/4404502?v=3","gravatar_id":"","url":"https://api.github.com/users/Drakulix","html_url":"https://github.com/Drakulix","followers_url":"https://api.github.com/users/Drakulix/followers","following_url":"https://api.github.com/users/Drakulix/following{/other_user}","gists_url":"https://api.github.com/users/Drakulix/gists{/gist_id}","starred_url":"https://api.github.com/users/Drakulix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drakulix/subscriptions","organizations_url":"https://api.github.com/users/Drakulix/orgs","repos_url":"https://api.github.com/users/Drakulix/repos","events_url":"https://api.github.com/users/Drakulix/events{/privacy}","received_events_url":"https://api.github.com/users/Drakulix/received_events","type":"User","site_admin":false},"body":"If it is documented, it is not as unexpected, as I did imagine it at first.\r\nDefinitely still something, that should be on the long-term todo list, but I think then this is good for merge.","created_at":"2016-12-15T17:30:47Z","updated_at":"2016-12-15T17:30:47Z","html_url":"https://github.com/iwburns/id-tree/pull/8#discussion_r92658575","pull_request_url":"https://api.github.com/repos/iwburns/id-tree/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/iwburns/id-tree/pulls/comments/92658575"},"html":{"href":"https://github.com/iwburns/id-tree/pull/8#discussion_r92658575"},"pull_request":{"href":"https://api.github.com/repos/iwburns/id-tree/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/iwburns/id-tree/pulls/8","id":98184195,"html_url":"https://github.com/iwburns/id-tree/pull/8","diff_url":"https://github.com/iwburns/id-tree/pull/8.diff","patch_url":"https://github.com/iwburns/id-tree/pull/8.patch","issue_url":"https://api.github.com/repos/iwburns/id-tree/issues/8","number":8,"state":"open","locked":false,"title":"Bug invalid tree root","user":{"login":"iwburns","id":6172641,"avatar_url":"https://avatars.githubusercontent.com/u/6172641?v=3","gravatar_id":"","url":"https://api.github.com/users/iwburns","html_url":"https://github.com/iwburns","followers_url":"https://api.github.com/users/iwburns/followers","following_url":"https://api.github.com/users/iwburns/following{/other_user}","gists_url":"https://api.github.com/users/iwburns/gists{/gist_id}","starred_url":"https://api.github.com/users/iwburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwburns/subscriptions","organizations_url":"https://api.github.com/users/iwburns/orgs","repos_url":"https://api.github.com/users/iwburns/repos","events_url":"https://api.github.com/users/iwburns/events{/privacy}","received_events_url":"https://api.github.com/users/iwburns/received_events","type":"User","site_admin":false},"body":"Fixes #7 \r\n\r\n@Drakulix I would love your input on this if you have time.  Can you see anything that I missed?","created_at":"2016-12-15T16:29:55Z","updated_at":"2016-12-15T17:30:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4693c8b85e7fe7cd633658079f39f24970aec468","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/iwburns/id-tree/pulls/8/commits","review_comments_url":"https://api.github.com/repos/iwburns/id-tree/pulls/8/comments","review_comment_url":"https://api.github.com/repos/iwburns/id-tree/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iwburns/id-tree/issues/8/comments","statuses_url":"https://api.github.com/repos/iwburns/id-tree/statuses/26d053c0af61857b07ca4015c546c5584f85400e","head":{"label":"iwburns:bug-invalidTreeRoot","ref":"bug-invalidTreeRoot","sha":"26d053c0af61857b07ca4015c546c5584f85400e","user":{"login":"iwburns","id":6172641,"avatar_url":"https://avatars.githubusercontent.com/u/6172641?v=3","gravatar_id":"","url":"https://api.github.com/users/iwburns","html_url":"https://github.com/iwburns","followers_url":"https://api.github.com/users/iwburns/followers","following_url":"https://api.github.com/users/iwburns/following{/other_user}","gists_url":"https://api.github.com/users/iwburns/gists{/gist_id}","starred_url":"https://api.github.com/users/iwburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwburns/subscriptions","organizations_url":"https://api.github.com/users/iwburns/orgs","repos_url":"https://api.github.com/users/iwburns/repos","events_url":"https://api.github.com/users/iwburns/events{/privacy}","received_events_url":"https://api.github.com/users/iwburns/received_events","type":"User","site_admin":false},"repo":{"id":68147191,"name":"id-tree","full_name":"iwburns/id-tree","owner":{"login":"iwburns","id":6172641,"avatar_url":"https://avatars.githubusercontent.com/u/6172641?v=3","gravatar_id":"","url":"https://api.github.com/users/iwburns","html_url":"https://github.com/iwburns","followers_url":"https://api.github.com/users/iwburns/followers","following_url":"https://api.github.com/users/iwburns/following{/other_user}","gists_url":"https://api.github.com/users/iwburns/gists{/gist_id}","starred_url":"https://api.github.com/users/iwburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwburns/subscriptions","organizations_url":"https://api.github.com/users/iwburns/orgs","repos_url":"https://api.github.com/users/iwburns/repos","events_url":"https://api.github.com/users/iwburns/events{/privacy}","received_events_url":"https://api.github.com/users/iwburns/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iwburns/id-tree","description":"A library for creating and modifying Tree structures.","fork":false,"url":"https://api.github.com/repos/iwburns/id-tree","forks_url":"https://api.github.com/repos/iwburns/id-tree/forks","keys_url":"https://api.github.com/repos/iwburns/id-tree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iwburns/id-tree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iwburns/id-tree/teams","hooks_url":"https://api.github.com/repos/iwburns/id-tree/hooks","issue_events_url":"https://api.github.com/repos/iwburns/id-tree/issues/events{/number}","events_url":"https://api.github.com/repos/iwburns/id-tree/events","assignees_url":"https://api.github.com/repos/iwburns/id-tree/assignees{/user}","branches_url":"https://api.github.com/repos/iwburns/id-tree/branches{/branch}","tags_url":"https://api.github.com/repos/iwburns/id-tree/tags","blobs_url":"https://api.github.com/repos/iwburns/id-tree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iwburns/id-tree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iwburns/id-tree/git/refs{/sha}","trees_url":"https://api.github.com/repos/iwburns/id-tree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iwburns/id-tree/statuses/{sha}","languages_url":"https://api.github.com/repos/iwburns/id-tree/languages","stargazers_url":"https://api.github.com/repos/iwburns/id-tree/stargazers","contributors_url":"https://api.github.com/repos/iwburns/id-tree/contributors","subscribers_url":"https://api.github.com/repos/iwburns/id-tree/subscribers","subscription_url":"https://api.github.com/repos/iwburns/id-tree/subscription","commits_url":"https://api.github.com/repos/iwburns/id-tree/commits{/sha}","git_commits_url":"https://api.github.com/repos/iwburns/id-tree/git/commits{/sha}","comments_url":"https://api.github.com/repos/iwburns/id-tree/comments{/number}","issue_comment_url":"https://api.github.com/repos/iwburns/id-tree/issues/comments{/number}","contents_url":"https://api.github.com/repos/iwburns/id-tree/contents/{+path}","compare_url":"https://api.github.com/repos/iwburns/id-tree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iwburns/id-tree/merges","archive_url":"https://api.github.com/repos/iwburns/id-tree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iwburns/id-tree/downloads","issues_url":"https://api.github.com/repos/iwburns/id-tree/issues{/number}","pulls_url":"https://api.github.com/repos/iwburns/id-tree/pulls{/number}","milestones_url":"https://api.github.com/repos/iwburns/id-tree/milestones{/number}","notifications_url":"https://api.github.com/repos/iwburns/id-tree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iwburns/id-tree/labels{/name}","releases_url":"https://api.github.com/repos/iwburns/id-tree/releases{/id}","deployments_url":"https://api.github.com/repos/iwburns/id-tree/deployments","created_at":"2016-09-13T21:00:51Z","updated_at":"2016-12-15T02:47:52Z","pushed_at":"2016-12-15T16:29:55Z","git_url":"git://github.com/iwburns/id-tree.git","ssh_url":"git@github.com:iwburns/id-tree.git","clone_url":"https://github.com/iwburns/id-tree.git","svn_url":"https://github.com/iwburns/id-tree","homepage":"","size":65,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":7,"forks":1,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"iwburns:master","ref":"master","sha":"6d898ec7b1c27dd64a7d608cda5d60adce1fd56c","user":{"login":"iwburns","id":6172641,"avatar_url":"https://avatars.githubusercontent.com/u/6172641?v=3","gravatar_id":"","url":"https://api.github.com/users/iwburns","html_url":"https://github.com/iwburns","followers_url":"https://api.github.com/users/iwburns/followers","following_url":"https://api.github.com/users/iwburns/following{/other_user}","gists_url":"https://api.github.com/users/iwburns/gists{/gist_id}","starred_url":"https://api.github.com/users/iwburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwburns/subscriptions","organizations_url":"https://api.github.com/users/iwburns/orgs","repos_url":"https://api.github.com/users/iwburns/repos","events_url":"https://api.github.com/users/iwburns/events{/privacy}","received_events_url":"https://api.github.com/users/iwburns/received_events","type":"User","site_admin":false},"repo":{"id":68147191,"name":"id-tree","full_name":"iwburns/id-tree","owner":{"login":"iwburns","id":6172641,"avatar_url":"https://avatars.githubusercontent.com/u/6172641?v=3","gravatar_id":"","url":"https://api.github.com/users/iwburns","html_url":"https://github.com/iwburns","followers_url":"https://api.github.com/users/iwburns/followers","following_url":"https://api.github.com/users/iwburns/following{/other_user}","gists_url":"https://api.github.com/users/iwburns/gists{/gist_id}","starred_url":"https://api.github.com/users/iwburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwburns/subscriptions","organizations_url":"https://api.github.com/users/iwburns/orgs","repos_url":"https://api.github.com/users/iwburns/repos","events_url":"https://api.github.com/users/iwburns/events{/privacy}","received_events_url":"https://api.github.com/users/iwburns/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iwburns/id-tree","description":"A library for creating and modifying Tree structures.","fork":false,"url":"https://api.github.com/repos/iwburns/id-tree","forks_url":"https://api.github.com/repos/iwburns/id-tree/forks","keys_url":"https://api.github.com/repos/iwburns/id-tree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iwburns/id-tree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iwburns/id-tree/teams","hooks_url":"https://api.github.com/repos/iwburns/id-tree/hooks","issue_events_url":"https://api.github.com/repos/iwburns/id-tree/issues/events{/number}","events_url":"https://api.github.com/repos/iwburns/id-tree/events","assignees_url":"https://api.github.com/repos/iwburns/id-tree/assignees{/user}","branches_url":"https://api.github.com/repos/iwburns/id-tree/branches{/branch}","tags_url":"https://api.github.com/repos/iwburns/id-tree/tags","blobs_url":"https://api.github.com/repos/iwburns/id-tree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iwburns/id-tree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iwburns/id-tree/git/refs{/sha}","trees_url":"https://api.github.com/repos/iwburns/id-tree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iwburns/id-tree/statuses/{sha}","languages_url":"https://api.github.com/repos/iwburns/id-tree/languages","stargazers_url":"https://api.github.com/repos/iwburns/id-tree/stargazers","contributors_url":"https://api.github.com/repos/iwburns/id-tree/contributors","subscribers_url":"https://api.github.com/repos/iwburns/id-tree/subscribers","subscription_url":"https://api.github.com/repos/iwburns/id-tree/subscription","commits_url":"https://api.github.com/repos/iwburns/id-tree/commits{/sha}","git_commits_url":"https://api.github.com/repos/iwburns/id-tree/git/commits{/sha}","comments_url":"https://api.github.com/repos/iwburns/id-tree/comments{/number}","issue_comment_url":"https://api.github.com/repos/iwburns/id-tree/issues/comments{/number}","contents_url":"https://api.github.com/repos/iwburns/id-tree/contents/{+path}","compare_url":"https://api.github.com/repos/iwburns/id-tree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iwburns/id-tree/merges","archive_url":"https://api.github.com/repos/iwburns/id-tree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iwburns/id-tree/downloads","issues_url":"https://api.github.com/repos/iwburns/id-tree/issues{/number}","pulls_url":"https://api.github.com/repos/iwburns/id-tree/pulls{/number}","milestones_url":"https://api.github.com/repos/iwburns/id-tree/milestones{/number}","notifications_url":"https://api.github.com/repos/iwburns/id-tree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iwburns/id-tree/labels{/name}","releases_url":"https://api.github.com/repos/iwburns/id-tree/releases{/id}","deployments_url":"https://api.github.com/repos/iwburns/id-tree/deployments","created_at":"2016-09-13T21:00:51Z","updated_at":"2016-12-15T02:47:52Z","pushed_at":"2016-12-15T16:29:55Z","git_url":"git://github.com/iwburns/id-tree.git","ssh_url":"git@github.com:iwburns/id-tree.git","clone_url":"https://github.com/iwburns/id-tree.git","svn_url":"https://github.com/iwburns/id-tree","homepage":"","size":65,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":7,"forks":1,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iwburns/id-tree/pulls/8"},"html":{"href":"https://github.com/iwburns/id-tree/pull/8"},"issue":{"href":"https://api.github.com/repos/iwburns/id-tree/issues/8"},"comments":{"href":"https://api.github.com/repos/iwburns/id-tree/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/iwburns/id-tree/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/iwburns/id-tree/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iwburns/id-tree/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/iwburns/id-tree/statuses/26d053c0af61857b07ca4015c546c5584f85400e"}}}}
{"actor":{"display_login":"Drakulix"}}