{"action":"created","issue":{"url":"https://api.github.com/repos/serde-rs/serde/issues/166","labels_url":"https://api.github.com/repos/serde-rs/serde/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/serde-rs/serde/issues/166/comments","events_url":"https://api.github.com/repos/serde-rs/serde/issues/166/events","html_url":"https://github.com/serde-rs/serde/pull/166","id":109905797,"number":166,"title":"Improve error forwarding and `ValueDeserializer` usability – Take 2","user":{"login":"tomprogrammer","id":57975,"avatar_url":"https://avatars.githubusercontent.com/u/57975?v=3","gravatar_id":"","url":"https://api.github.com/users/tomprogrammer","html_url":"https://github.com/tomprogrammer","followers_url":"https://api.github.com/users/tomprogrammer/followers","following_url":"https://api.github.com/users/tomprogrammer/following{/other_user}","gists_url":"https://api.github.com/users/tomprogrammer/gists{/gist_id}","starred_url":"https://api.github.com/users/tomprogrammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomprogrammer/subscriptions","organizations_url":"https://api.github.com/users/tomprogrammer/orgs","repos_url":"https://api.github.com/users/tomprogrammer/repos","events_url":"https://api.github.com/users/tomprogrammer/events{/privacy}","received_events_url":"https://api.github.com/users/tomprogrammer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-05T23:21:29Z","updated_at":"2015-10-08T12:34:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/serde-rs/serde/pulls/166","html_url":"https://github.com/serde-rs/serde/pull/166","diff_url":"https://github.com/serde-rs/serde/pull/166.diff","patch_url":"https://github.com/serde-rs/serde/pull/166.patch"},"body":"There are two changes in this PR:\r\n\r\nWhen using a ValueDeserializer errors produced with the methods\r\ntype_mismatch, length_mismatch and syntax were not forwarded\r\ncorrectly. These methods now store all information in the enum\r\nde::value::Error.\r\n\r\nIn constrast to https://github.com/serde-rs/serde/pull/165 this PR makes it obsolete to add the `From<de::value::Error>` trait bound to the `de::Error` trait. Even the conversion of `de::value::Error` to the deserializer specific error is not needed with this PR, the ValueDeserializer is monomorphized to use the deserializer's error type.\r\n\r\nAn example for using a `ValueDeserializer` to forward deserializing to\r\nanother type's visitor:\r\n\r\n```rust\r\nfn visit_u8<E>(&mut self, value: u8) -> Result<Self::Value, E>\r\n    where E: de::Error\r\n{\r\n    try!(Deserialize::deserialize(&mut value.into_deserializer()))\r\n}\r\n```\r\n\r\nPlease note that there is an regression in serde-rs/json which needs to\r\nbe fixed.\r\n"},"comment":{"url":"https://api.github.com/repos/serde-rs/serde/issues/comments/146524449","html_url":"https://github.com/serde-rs/serde/pull/166#issuecomment-146524449","issue_url":"https://api.github.com/repos/serde-rs/serde/issues/166","id":146524449,"user":{"login":"GitCop","id":7943652,"avatar_url":"https://avatars.githubusercontent.com/u/7943652?v=3","gravatar_id":"","url":"https://api.github.com/users/GitCop","html_url":"https://github.com/GitCop","followers_url":"https://api.github.com/users/GitCop/followers","following_url":"https://api.github.com/users/GitCop/following{/other_user}","gists_url":"https://api.github.com/users/GitCop/gists{/gist_id}","starred_url":"https://api.github.com/users/GitCop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GitCop/subscriptions","organizations_url":"https://api.github.com/users/GitCop/orgs","repos_url":"https://api.github.com/users/GitCop/repos","events_url":"https://api.github.com/users/GitCop/events{/privacy}","received_events_url":"https://api.github.com/users/GitCop/received_events","type":"User","site_admin":false},"created_at":"2015-10-08T12:34:36Z","updated_at":"2015-10-08T12:34:36Z","body":"There were the following issues with your Pull Request\n\n * Commit: 0a651536349480a47ea80cb137ec450d0b708b6e\n  * Commits must be in the following format: **%{type}(%{scope}): %{description}**\n\n * Commit: e0429cdd96afa5022b8258f86212e2b6cfcf5543\n  * Commits must be in the following format: **%{type}(%{scope}): %{description}**\n\n * Commit: 7413bbb7bf2b92d7f92fba2fe1dde97f1933155c\n  * Commits must be in the following format: **%{type}(%{scope}): %{description}**\n\n * Commit: b7d93b6e110215617420f5778dfe7e0fe6a5d7f1\n  * Your commit message body contains a line that is longer than 72 characters\n  * Commits must be in the following format: **%{type}(%{scope}): %{description}**\n\nGuidelines are available at https://github.com/serde-rs/serde\n\n---\nThis message was auto-generated by https://gitcop.com\n"}}