{"action":"closed","number":33,"pull_request":{"url":"https://api.github.com/repos/PistonDevelopers/hematite_server/pulls/33","id":30697454,"html_url":"https://github.com/PistonDevelopers/hematite_server/pull/33","diff_url":"https://github.com/PistonDevelopers/hematite_server/pull/33.diff","patch_url":"https://github.com/PistonDevelopers/hematite_server/pull/33.patch","issue_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/issues/33","number":33,"state":"closed","locked":false,"title":"Cleanup and reorganization of `nbt`.","user":{"login":"atheriel","id":1448326,"avatar_url":"https://avatars.githubusercontent.com/u/1448326?v=3","gravatar_id":"","url":"https://api.github.com/users/atheriel","html_url":"https://github.com/atheriel","followers_url":"https://api.github.com/users/atheriel/followers","following_url":"https://api.github.com/users/atheriel/following{/other_user}","gists_url":"https://api.github.com/users/atheriel/gists{/gist_id}","starred_url":"https://api.github.com/users/atheriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atheriel/subscriptions","organizations_url":"https://api.github.com/users/atheriel/orgs","repos_url":"https://api.github.com/users/atheriel/repos","events_url":"https://api.github.com/users/atheriel/events{/privacy}","received_events_url":"https://api.github.com/users/atheriel/received_events","type":"User","site_admin":false},"body":"Originally, I wanted to clean up some stray `panic!`'s and add some more tests (in line with my comments on IRC), but in the process I tried simplifying and improving the whole module. I though I might submit it for review. Let me know what you think.\r\n\r\nGenerally speaking, I removed quite a lot of redundant code and rewrote & simplified the readers and writers to make them recursive. There's now a new top-level object, `NbtFile` (which could also be renamed, say, `NbtObject`) which encapsulates the idea of all NBT-encoded data being a named `Compound` and handles the high-level encoding/decoding/indexing.\r\n\r\nThere are also some new and more extensive tests. I've used them to verify that the new parsers match the output of the old ones.\r\n\r\nFinally, the use of the `flate` crate has been replaced by the newer, better `flate2` one.\r\n","created_at":"2015-03-07T04:53:04Z","updated_at":"2015-03-07T20:40:31Z","closed_at":"2015-03-07T20:40:31Z","merged_at":"2015-03-07T20:40:31Z","merge_commit_sha":"d4e77a08f09a06b9e51acca6ba4a8eab97171d5c","assignee":null,"milestone":{"url":"https://api.github.com/repos/PistonDevelopers/hematite_server/milestones/3","html_url":"https://github.com/PistonDevelopers/hematite_server/milestones/MC%201.8.3%20Protocol","labels_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/milestones/3/labels","id":1003947,"number":3,"title":"MC 1.8.3 Protocol","description":"Decoding/encoding support for all network packets of protocol version 47.","creator":{"login":"toqueteos","id":699969,"avatar_url":"https://avatars.githubusercontent.com/u/699969?v=3","gravatar_id":"","url":"https://api.github.com/users/toqueteos","html_url":"https://github.com/toqueteos","followers_url":"https://api.github.com/users/toqueteos/followers","following_url":"https://api.github.com/users/toqueteos/following{/other_user}","gists_url":"https://api.github.com/users/toqueteos/gists{/gist_id}","starred_url":"https://api.github.com/users/toqueteos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toqueteos/subscriptions","organizations_url":"https://api.github.com/users/toqueteos/orgs","repos_url":"https://api.github.com/users/toqueteos/repos","events_url":"https://api.github.com/users/toqueteos/events{/privacy}","received_events_url":"https://api.github.com/users/toqueteos/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":3,"state":"open","created_at":"2015-03-03T12:43:43Z","updated_at":"2015-03-07T20:40:31Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/pulls/33/commits","review_comments_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/pulls/33/comments","review_comment_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/issues/33/comments","statuses_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/statuses/c0c9d38e75856989e1a6c94cc92db9ba9c28b842","head":{"label":"atheriel:nbt-cleanup","ref":"nbt-cleanup","sha":"c0c9d38e75856989e1a6c94cc92db9ba9c28b842","user":{"login":"atheriel","id":1448326,"avatar_url":"https://avatars.githubusercontent.com/u/1448326?v=3","gravatar_id":"","url":"https://api.github.com/users/atheriel","html_url":"https://github.com/atheriel","followers_url":"https://api.github.com/users/atheriel/followers","following_url":"https://api.github.com/users/atheriel/following{/other_user}","gists_url":"https://api.github.com/users/atheriel/gists{/gist_id}","starred_url":"https://api.github.com/users/atheriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atheriel/subscriptions","organizations_url":"https://api.github.com/users/atheriel/orgs","repos_url":"https://api.github.com/users/atheriel/repos","events_url":"https://api.github.com/users/atheriel/events{/privacy}","received_events_url":"https://api.github.com/users/atheriel/received_events","type":"User","site_admin":false},"repo":{"id":31741774,"name":"hematite_server","full_name":"atheriel/hematite_server","owner":{"login":"atheriel","id":1448326,"avatar_url":"https://avatars.githubusercontent.com/u/1448326?v=3","gravatar_id":"","url":"https://api.github.com/users/atheriel","html_url":"https://github.com/atheriel","followers_url":"https://api.github.com/users/atheriel/followers","following_url":"https://api.github.com/users/atheriel/following{/other_user}","gists_url":"https://api.github.com/users/atheriel/gists{/gist_id}","starred_url":"https://api.github.com/users/atheriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atheriel/subscriptions","organizations_url":"https://api.github.com/users/atheriel/orgs","repos_url":"https://api.github.com/users/atheriel/repos","events_url":"https://api.github.com/users/atheriel/events{/privacy}","received_events_url":"https://api.github.com/users/atheriel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atheriel/hematite_server","description":"A Minecraft server clone","fork":true,"url":"https://api.github.com/repos/atheriel/hematite_server","forks_url":"https://api.github.com/repos/atheriel/hematite_server/forks","keys_url":"https://api.github.com/repos/atheriel/hematite_server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atheriel/hematite_server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atheriel/hematite_server/teams","hooks_url":"https://api.github.com/repos/atheriel/hematite_server/hooks","issue_events_url":"https://api.github.com/repos/atheriel/hematite_server/issues/events{/number}","events_url":"https://api.github.com/repos/atheriel/hematite_server/events","assignees_url":"https://api.github.com/repos/atheriel/hematite_server/assignees{/user}","branches_url":"https://api.github.com/repos/atheriel/hematite_server/branches{/branch}","tags_url":"https://api.github.com/repos/atheriel/hematite_server/tags","blobs_url":"https://api.github.com/repos/atheriel/hematite_server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atheriel/hematite_server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atheriel/hematite_server/git/refs{/sha}","trees_url":"https://api.github.com/repos/atheriel/hematite_server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atheriel/hematite_server/statuses/{sha}","languages_url":"https://api.github.com/repos/atheriel/hematite_server/languages","stargazers_url":"https://api.github.com/repos/atheriel/hematite_server/stargazers","contributors_url":"https://api.github.com/repos/atheriel/hematite_server/contributors","subscribers_url":"https://api.github.com/repos/atheriel/hematite_server/subscribers","subscription_url":"https://api.github.com/repos/atheriel/hematite_server/subscription","commits_url":"https://api.github.com/repos/atheriel/hematite_server/commits{/sha}","git_commits_url":"https://api.github.com/repos/atheriel/hematite_server/git/commits{/sha}","comments_url":"https://api.github.com/repos/atheriel/hematite_server/comments{/number}","issue_comment_url":"https://api.github.com/repos/atheriel/hematite_server/issues/comments{/number}","contents_url":"https://api.github.com/repos/atheriel/hematite_server/contents/{+path}","compare_url":"https://api.github.com/repos/atheriel/hematite_server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atheriel/hematite_server/merges","archive_url":"https://api.github.com/repos/atheriel/hematite_server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atheriel/hematite_server/downloads","issues_url":"https://api.github.com/repos/atheriel/hematite_server/issues{/number}","pulls_url":"https://api.github.com/repos/atheriel/hematite_server/pulls{/number}","milestones_url":"https://api.github.com/repos/atheriel/hematite_server/milestones{/number}","notifications_url":"https://api.github.com/repos/atheriel/hematite_server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atheriel/hematite_server/labels{/name}","releases_url":"https://api.github.com/repos/atheriel/hematite_server/releases{/id}","created_at":"2015-03-05T23:07:30Z","updated_at":"2015-03-05T23:07:30Z","pushed_at":"2015-03-07T20:33:29Z","git_url":"git://github.com/atheriel/hematite_server.git","ssh_url":"git@github.com:atheriel/hematite_server.git","clone_url":"https://github.com/atheriel/hematite_server.git","svn_url":"https://github.com/atheriel/hematite_server","homepage":null,"size":232,"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":"PistonDevelopers:master","ref":"master","sha":"acc73d446df3d2c0b7da0286e0941ed383a790fd","user":{"login":"PistonDevelopers","id":7623406,"avatar_url":"https://avatars.githubusercontent.com/u/7623406?v=3","gravatar_id":"","url":"https://api.github.com/users/PistonDevelopers","html_url":"https://github.com/PistonDevelopers","followers_url":"https://api.github.com/users/PistonDevelopers/followers","following_url":"https://api.github.com/users/PistonDevelopers/following{/other_user}","gists_url":"https://api.github.com/users/PistonDevelopers/gists{/gist_id}","starred_url":"https://api.github.com/users/PistonDevelopers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PistonDevelopers/subscriptions","organizations_url":"https://api.github.com/users/PistonDevelopers/orgs","repos_url":"https://api.github.com/users/PistonDevelopers/repos","events_url":"https://api.github.com/users/PistonDevelopers/events{/privacy}","received_events_url":"https://api.github.com/users/PistonDevelopers/received_events","type":"Organization","site_admin":false},"repo":{"id":29402029,"name":"hematite_server","full_name":"PistonDevelopers/hematite_server","owner":{"login":"PistonDevelopers","id":7623406,"avatar_url":"https://avatars.githubusercontent.com/u/7623406?v=3","gravatar_id":"","url":"https://api.github.com/users/PistonDevelopers","html_url":"https://github.com/PistonDevelopers","followers_url":"https://api.github.com/users/PistonDevelopers/followers","following_url":"https://api.github.com/users/PistonDevelopers/following{/other_user}","gists_url":"https://api.github.com/users/PistonDevelopers/gists{/gist_id}","starred_url":"https://api.github.com/users/PistonDevelopers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PistonDevelopers/subscriptions","organizations_url":"https://api.github.com/users/PistonDevelopers/orgs","repos_url":"https://api.github.com/users/PistonDevelopers/repos","events_url":"https://api.github.com/users/PistonDevelopers/events{/privacy}","received_events_url":"https://api.github.com/users/PistonDevelopers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PistonDevelopers/hematite_server","description":"A Minecraft server clone","fork":false,"url":"https://api.github.com/repos/PistonDevelopers/hematite_server","forks_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/forks","keys_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/teams","hooks_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/hooks","issue_events_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/issues/events{/number}","events_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/events","assignees_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/assignees{/user}","branches_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/branches{/branch}","tags_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/tags","blobs_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/git/refs{/sha}","trees_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/statuses/{sha}","languages_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/languages","stargazers_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/stargazers","contributors_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/contributors","subscribers_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/subscribers","subscription_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/subscription","commits_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/commits{/sha}","git_commits_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/git/commits{/sha}","comments_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/comments{/number}","issue_comment_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/issues/comments{/number}","contents_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/contents/{+path}","compare_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/merges","archive_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/downloads","issues_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/issues{/number}","pulls_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/pulls{/number}","milestones_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/milestones{/number}","notifications_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/labels{/name}","releases_url":"https://api.github.com/repos/PistonDevelopers/hematite_server/releases{/id}","created_at":"2015-01-17T19:02:55Z","updated_at":"2015-03-07T20:39:44Z","pushed_at":"2015-03-07T20:40:31Z","git_url":"git://github.com/PistonDevelopers/hematite_server.git","ssh_url":"git@github.com:PistonDevelopers/hematite_server.git","clone_url":"https://github.com/PistonDevelopers/hematite_server.git","svn_url":"https://github.com/PistonDevelopers/hematite_server","homepage":null,"size":652,"stargazers_count":11,"watchers_count":11,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":7,"forks":3,"open_issues":7,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PistonDevelopers/hematite_server/pulls/33"},"html":{"href":"https://github.com/PistonDevelopers/hematite_server/pull/33"},"issue":{"href":"https://api.github.com/repos/PistonDevelopers/hematite_server/issues/33"},"comments":{"href":"https://api.github.com/repos/PistonDevelopers/hematite_server/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/PistonDevelopers/hematite_server/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/PistonDevelopers/hematite_server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PistonDevelopers/hematite_server/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/PistonDevelopers/hematite_server/statuses/c0c9d38e75856989e1a6c94cc92db9ba9c28b842"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"fenhl","id":641386,"avatar_url":"https://avatars.githubusercontent.com/u/641386?v=3","gravatar_id":"","url":"https://api.github.com/users/fenhl","html_url":"https://github.com/fenhl","followers_url":"https://api.github.com/users/fenhl/followers","following_url":"https://api.github.com/users/fenhl/following{/other_user}","gists_url":"https://api.github.com/users/fenhl/gists{/gist_id}","starred_url":"https://api.github.com/users/fenhl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fenhl/subscriptions","organizations_url":"https://api.github.com/users/fenhl/orgs","repos_url":"https://api.github.com/users/fenhl/repos","events_url":"https://api.github.com/users/fenhl/events{/privacy}","received_events_url":"https://api.github.com/users/fenhl/received_events","type":"User","site_admin":false},"comments":11,"review_comments":4,"commits":12,"additions":451,"deletions":397,"changed_files":6}}