{"action":"created","comment":{"url":"https://api.github.com/repos/PistonDevelopers/image/pulls/comments/27118290","id":27118290,"diff_hunk":"@@ -56,12 +58,21 @@ impl fmt::Display for ImageError {\n     }\n }\n \n-impl FromError<old_io::IoError> for ImageError {\n-    fn from_error(err: old_io::IoError) -> ImageError {\n+impl FromError<io::Error> for ImageError {\n+    fn from_error(err: io::Error) -> ImageError {\n         ImageError::IoError(err)\n     }\n }\n \n+impl FromError<byteorder::Error> for ImageError {\n+    fn from_error(err: byteorder::Error) -> ImageError {\n+        match err {\n+            byteorder::Error::UnexpectedEOF => ImageError::ImageEnd,","path":"src/image.rs","position":38,"original_position":38,"commit_id":"35ecf8fc64cd40449d800719514d7ae618962073","original_commit_id":"35ecf8fc64cd40449d800719514d7ae618962073","user":{"login":"tomaka","id":1412254,"avatar_url":"https://avatars.githubusercontent.com/u/1412254?v=3","gravatar_id":"","url":"https://api.github.com/users/tomaka","html_url":"https://github.com/tomaka","followers_url":"https://api.github.com/users/tomaka/followers","following_url":"https://api.github.com/users/tomaka/following{/other_user}","gists_url":"https://api.github.com/users/tomaka/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaka/subscriptions","organizations_url":"https://api.github.com/users/tomaka/orgs","repos_url":"https://api.github.com/users/tomaka/repos","events_url":"https://api.github.com/users/tomaka/events{/privacy}","received_events_url":"https://api.github.com/users/tomaka/received_events","type":"User","site_admin":false},"body":"The underlying problem is that `ErrorKind::EndOfFile` no longer exists in new I/O.\r\nIf you want to read at least N bytes, but EOF happens before, it used to return this error.\r\n\r\nThat's why we need a replacement for it (here and at some other places). I picked `ImageEnd` but was not really sure about it.\r\n","created_at":"2015-03-25T13:13:40Z","updated_at":"2015-03-25T13:13:40Z","html_url":"https://github.com/PistonDevelopers/image/pull/339#discussion_r27118290","pull_request_url":"https://api.github.com/repos/PistonDevelopers/image/pulls/339","_links":{"self":{"href":"https://api.github.com/repos/PistonDevelopers/image/pulls/comments/27118290"},"html":{"href":"https://github.com/PistonDevelopers/image/pull/339#discussion_r27118290"},"pull_request":{"href":"https://api.github.com/repos/PistonDevelopers/image/pulls/339"}}},"pull_request":{"url":"https://api.github.com/repos/PistonDevelopers/image/pulls/339","id":31853270,"html_url":"https://github.com/PistonDevelopers/image/pull/339","diff_url":"https://github.com/PistonDevelopers/image/pull/339.diff","patch_url":"https://github.com/PistonDevelopers/image/pull/339.patch","issue_url":"https://api.github.com/repos/PistonDevelopers/image/issues/339","number":339,"state":"open","locked":false,"title":"Switch to new I/O","user":{"login":"tomaka","id":1412254,"avatar_url":"https://avatars.githubusercontent.com/u/1412254?v=3","gravatar_id":"","url":"https://api.github.com/users/tomaka","html_url":"https://github.com/tomaka","followers_url":"https://api.github.com/users/tomaka/followers","following_url":"https://api.github.com/users/tomaka/following{/other_user}","gists_url":"https://api.github.com/users/tomaka/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaka/subscriptions","organizations_url":"https://api.github.com/users/tomaka/orgs","repos_url":"https://api.github.com/users/tomaka/repos","events_url":"https://api.github.com/users/tomaka/events{/privacy}","received_events_url":"https://api.github.com/users/tomaka/received_events","type":"User","site_admin":false},"body":"Three and a half hour of work, but it's there!\r\n\r\nI started from scratch, as this approach was probably easier than rebasing #321 \r\n\r\nIt adds a dependency to the `byteorder` crate, which provides equivalents to `read_le_u16` and similar.","created_at":"2015-03-24T17:59:36Z","updated_at":"2015-03-25T13:13:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb6e9e62cfdb5c536a310b40b9df65232e3c71a0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/PistonDevelopers/image/pulls/339/commits","review_comments_url":"https://api.github.com/repos/PistonDevelopers/image/pulls/339/comments","review_comment_url":"https://api.github.com/repos/PistonDevelopers/image/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PistonDevelopers/image/issues/339/comments","statuses_url":"https://api.github.com/repos/PistonDevelopers/image/statuses/35ecf8fc64cd40449d800719514d7ae618962073","head":{"label":"tomaka:io","ref":"io","sha":"35ecf8fc64cd40449d800719514d7ae618962073","user":{"login":"tomaka","id":1412254,"avatar_url":"https://avatars.githubusercontent.com/u/1412254?v=3","gravatar_id":"","url":"https://api.github.com/users/tomaka","html_url":"https://github.com/tomaka","followers_url":"https://api.github.com/users/tomaka/followers","following_url":"https://api.github.com/users/tomaka/following{/other_user}","gists_url":"https://api.github.com/users/tomaka/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaka/subscriptions","organizations_url":"https://api.github.com/users/tomaka/orgs","repos_url":"https://api.github.com/users/tomaka/repos","events_url":"https://api.github.com/users/tomaka/events{/privacy}","received_events_url":"https://api.github.com/users/tomaka/received_events","type":"User","site_admin":false},"repo":{"id":24716622,"name":"image","full_name":"tomaka/image","owner":{"login":"tomaka","id":1412254,"avatar_url":"https://avatars.githubusercontent.com/u/1412254?v=3","gravatar_id":"","url":"https://api.github.com/users/tomaka","html_url":"https://github.com/tomaka","followers_url":"https://api.github.com/users/tomaka/followers","following_url":"https://api.github.com/users/tomaka/following{/other_user}","gists_url":"https://api.github.com/users/tomaka/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaka/subscriptions","organizations_url":"https://api.github.com/users/tomaka/orgs","repos_url":"https://api.github.com/users/tomaka/repos","events_url":"https://api.github.com/users/tomaka/events{/privacy}","received_events_url":"https://api.github.com/users/tomaka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomaka/image","description":"Encoding and decoding images in Rust","fork":true,"url":"https://api.github.com/repos/tomaka/image","forks_url":"https://api.github.com/repos/tomaka/image/forks","keys_url":"https://api.github.com/repos/tomaka/image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomaka/image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomaka/image/teams","hooks_url":"https://api.github.com/repos/tomaka/image/hooks","issue_events_url":"https://api.github.com/repos/tomaka/image/issues/events{/number}","events_url":"https://api.github.com/repos/tomaka/image/events","assignees_url":"https://api.github.com/repos/tomaka/image/assignees{/user}","branches_url":"https://api.github.com/repos/tomaka/image/branches{/branch}","tags_url":"https://api.github.com/repos/tomaka/image/tags","blobs_url":"https://api.github.com/repos/tomaka/image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomaka/image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomaka/image/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomaka/image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomaka/image/statuses/{sha}","languages_url":"https://api.github.com/repos/tomaka/image/languages","stargazers_url":"https://api.github.com/repos/tomaka/image/stargazers","contributors_url":"https://api.github.com/repos/tomaka/image/contributors","subscribers_url":"https://api.github.com/repos/tomaka/image/subscribers","subscription_url":"https://api.github.com/repos/tomaka/image/subscription","commits_url":"https://api.github.com/repos/tomaka/image/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomaka/image/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomaka/image/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomaka/image/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomaka/image/contents/{+path}","compare_url":"https://api.github.com/repos/tomaka/image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomaka/image/merges","archive_url":"https://api.github.com/repos/tomaka/image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomaka/image/downloads","issues_url":"https://api.github.com/repos/tomaka/image/issues{/number}","pulls_url":"https://api.github.com/repos/tomaka/image/pulls{/number}","milestones_url":"https://api.github.com/repos/tomaka/image/milestones{/number}","notifications_url":"https://api.github.com/repos/tomaka/image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomaka/image/labels{/name}","releases_url":"https://api.github.com/repos/tomaka/image/releases{/id}","created_at":"2014-10-02T11:38:17Z","updated_at":"2015-03-21T12:58:32Z","pushed_at":"2015-03-24T17:59:06Z","git_url":"git://github.com/tomaka/image.git","ssh_url":"git@github.com:tomaka/image.git","clone_url":"https://github.com/tomaka/image.git","svn_url":"https://github.com/tomaka/image","homepage":null,"size":1805,"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":"8538368ebf8bdec5a5e1d9e772df217ac96a1cb8","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":20153092,"name":"image","full_name":"PistonDevelopers/image","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/image","description":"Encoding and decoding images in Rust","fork":false,"url":"https://api.github.com/repos/PistonDevelopers/image","forks_url":"https://api.github.com/repos/PistonDevelopers/image/forks","keys_url":"https://api.github.com/repos/PistonDevelopers/image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PistonDevelopers/image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PistonDevelopers/image/teams","hooks_url":"https://api.github.com/repos/PistonDevelopers/image/hooks","issue_events_url":"https://api.github.com/repos/PistonDevelopers/image/issues/events{/number}","events_url":"https://api.github.com/repos/PistonDevelopers/image/events","assignees_url":"https://api.github.com/repos/PistonDevelopers/image/assignees{/user}","branches_url":"https://api.github.com/repos/PistonDevelopers/image/branches{/branch}","tags_url":"https://api.github.com/repos/PistonDevelopers/image/tags","blobs_url":"https://api.github.com/repos/PistonDevelopers/image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PistonDevelopers/image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PistonDevelopers/image/git/refs{/sha}","trees_url":"https://api.github.com/repos/PistonDevelopers/image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PistonDevelopers/image/statuses/{sha}","languages_url":"https://api.github.com/repos/PistonDevelopers/image/languages","stargazers_url":"https://api.github.com/repos/PistonDevelopers/image/stargazers","contributors_url":"https://api.github.com/repos/PistonDevelopers/image/contributors","subscribers_url":"https://api.github.com/repos/PistonDevelopers/image/subscribers","subscription_url":"https://api.github.com/repos/PistonDevelopers/image/subscription","commits_url":"https://api.github.com/repos/PistonDevelopers/image/commits{/sha}","git_commits_url":"https://api.github.com/repos/PistonDevelopers/image/git/commits{/sha}","comments_url":"https://api.github.com/repos/PistonDevelopers/image/comments{/number}","issue_comment_url":"https://api.github.com/repos/PistonDevelopers/image/issues/comments{/number}","contents_url":"https://api.github.com/repos/PistonDevelopers/image/contents/{+path}","compare_url":"https://api.github.com/repos/PistonDevelopers/image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PistonDevelopers/image/merges","archive_url":"https://api.github.com/repos/PistonDevelopers/image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PistonDevelopers/image/downloads","issues_url":"https://api.github.com/repos/PistonDevelopers/image/issues{/number}","pulls_url":"https://api.github.com/repos/PistonDevelopers/image/pulls{/number}","milestones_url":"https://api.github.com/repos/PistonDevelopers/image/milestones{/number}","notifications_url":"https://api.github.com/repos/PistonDevelopers/image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PistonDevelopers/image/labels{/name}","releases_url":"https://api.github.com/repos/PistonDevelopers/image/releases{/id}","created_at":"2014-05-25T11:39:07Z","updated_at":"2015-03-24T21:41:05Z","pushed_at":"2015-03-24T22:27:59Z","git_url":"git://github.com/PistonDevelopers/image.git","ssh_url":"git@github.com:PistonDevelopers/image.git","clone_url":"https://github.com/PistonDevelopers/image.git","svn_url":"https://github.com/PistonDevelopers/image","homepage":null,"size":5530,"stargazers_count":117,"watchers_count":117,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":62,"mirror_url":null,"open_issues_count":29,"forks":62,"open_issues":29,"watchers":117,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PistonDevelopers/image/pulls/339"},"html":{"href":"https://github.com/PistonDevelopers/image/pull/339"},"issue":{"href":"https://api.github.com/repos/PistonDevelopers/image/issues/339"},"comments":{"href":"https://api.github.com/repos/PistonDevelopers/image/issues/339/comments"},"review_comments":{"href":"https://api.github.com/repos/PistonDevelopers/image/pulls/339/comments"},"review_comment":{"href":"https://api.github.com/repos/PistonDevelopers/image/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PistonDevelopers/image/pulls/339/commits"},"statuses":{"href":"https://api.github.com/repos/PistonDevelopers/image/statuses/35ecf8fc64cd40449d800719514d7ae618962073"}}}}