{"action":"created","issue":{"url":"https://api.github.com/repos/fpgaminer/rust-lzma/issues/10","repository_url":"https://api.github.com/repos/fpgaminer/rust-lzma","labels_url":"https://api.github.com/repos/fpgaminer/rust-lzma/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/fpgaminer/rust-lzma/issues/10/comments","events_url":"https://api.github.com/repos/fpgaminer/rust-lzma/issues/10/events","html_url":"https://github.com/fpgaminer/rust-lzma/pull/10","id":145462144,"number":10,"title":"Improve drop implementation to prevent accidental corruption","user":{"login":"efyang","id":10342494,"avatar_url":"https://avatars.githubusercontent.com/u/10342494?v=3","gravatar_id":"","url":"https://api.github.com/users/efyang","html_url":"https://github.com/efyang","followers_url":"https://api.github.com/users/efyang/followers","following_url":"https://api.github.com/users/efyang/following{/other_user}","gists_url":"https://api.github.com/users/efyang/gists{/gist_id}","starred_url":"https://api.github.com/users/efyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/efyang/subscriptions","organizations_url":"https://api.github.com/users/efyang/orgs","repos_url":"https://api.github.com/users/efyang/repos","events_url":"https://api.github.com/users/efyang/events{/privacy}","received_events_url":"https://api.github.com/users/efyang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-03T06:53:06Z","updated_at":"2016-05-24T22:20:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fpgaminer/rust-lzma/pulls/10","html_url":"https://github.com/fpgaminer/rust-lzma/pull/10","diff_url":"https://github.com/fpgaminer/rust-lzma/pull/10.diff","patch_url":"https://github.com/fpgaminer/rust-lzma/pull/10.patch"},"body":"Basically, this PR just forces ```LzmaWriter``` to call ```finish``` before ending the stream. This prevents any accidental corruptions and makes it much easier to write any structs that might contain it, and makes it behave a bit more like compressors in the ```flate2``` and ```bzip2``` libraries."},"comment":{"url":"https://api.github.com/repos/fpgaminer/rust-lzma/issues/comments/221419417","html_url":"https://github.com/fpgaminer/rust-lzma/pull/10#issuecomment-221419417","issue_url":"https://api.github.com/repos/fpgaminer/rust-lzma/issues/10","id":221419417,"user":{"login":"fpgaminer","id":1585817,"avatar_url":"https://avatars.githubusercontent.com/u/1585817?v=3","gravatar_id":"","url":"https://api.github.com/users/fpgaminer","html_url":"https://github.com/fpgaminer","followers_url":"https://api.github.com/users/fpgaminer/followers","following_url":"https://api.github.com/users/fpgaminer/following{/other_user}","gists_url":"https://api.github.com/users/fpgaminer/gists{/gist_id}","starred_url":"https://api.github.com/users/fpgaminer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpgaminer/subscriptions","organizations_url":"https://api.github.com/users/fpgaminer/orgs","repos_url":"https://api.github.com/users/fpgaminer/repos","events_url":"https://api.github.com/users/fpgaminer/events{/privacy}","received_events_url":"https://api.github.com/users/fpgaminer/received_events","type":"User","site_admin":false},"created_at":"2016-05-24T22:20:50Z","updated_at":"2016-05-24T22:20:50Z","body":"Hey, thank you for this pull request!  Sorry I did not get a chance to take a look at it sooner.\r\n\r\nThe reason I wasn't calling `finish` in `drop` is because `finish` returns an error and `drop` has no way to propagate that error to the library's user.  It allows the user to write code that compiles and runs correctly, but which isn't actually correct, because it won't handle all error scenarios.  That's not very Rust-ic I think."}}
{"actor":{"display_login":"fpgaminer"}}