{"action":"created","comment":{"url":"https://api.github.com/repos/serde-rs/serde/pulls/comments/61880068","id":61880068,"diff_hunk":"@@ -954,14 +1081,27 @@ impl<T, E> Deserialize for Result<T, E> where T: Deserialize, E: Deserialize {\n                 impl ::de::Visitor for FieldVisitor {\n                     type Value = Field;\n \n+                    #[cfg(any(feature = \"std\", feature = \"collections\"))]\n                     fn visit_usize<E>(&mut self, value: usize) -> Result<Field, E> where E: Error {\n+                        #[cfg(feature = \"collections\")]\n+                        use collections::string::ToString;\n                         match value {\n                             0 => Ok(Field::Ok),\n                             1 => Ok(Field::Err),\n                             _ => Err(Error::unknown_field(&value.to_string())),\n                         }\n                     }\n \n+                    #[cfg(all(not(feature = \"std\"), not(feature = \"collections\")))]\n+                    fn visit_usize<E>(&mut self, value: usize) -> Result<Field, E> where E: Error {\n+                        #[cfg(feature = \"collections\")]\n+                        use collections::string::ToString;\n+                        match value {\n+                            0 => Ok(Field::Ok),\n+                            1 => Ok(Field::Err),\n+                            _ => Err(Error::unknown_field(\"some number (no to_string)\")),\n+                        }\n+                    }","path":"serde/src/de/impls.rs","position":399,"original_position":399,"commit_id":"d096f44af5142d701d16f52aaf313e316126a7d2","original_commit_id":"d096f44af5142d701d16f52aaf313e316126a7d2","user":{"login":"erickt","id":84711,"avatar_url":"https://avatars.githubusercontent.com/u/84711?v=3","gravatar_id":"","url":"https://api.github.com/users/erickt","html_url":"https://github.com/erickt","followers_url":"https://api.github.com/users/erickt/followers","following_url":"https://api.github.com/users/erickt/following{/other_user}","gists_url":"https://api.github.com/users/erickt/gists{/gist_id}","starred_url":"https://api.github.com/users/erickt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erickt/subscriptions","organizations_url":"https://api.github.com/users/erickt/orgs","repos_url":"https://api.github.com/users/erickt/repos","events_url":"https://api.github.com/users/erickt/events{/privacy}","received_events_url":"https://api.github.com/users/erickt/received_events","type":"User","site_admin":false},"body":"Nit: add a newline here. ","created_at":"2016-05-03T13:25:58Z","updated_at":"2016-05-03T13:25:58Z","html_url":"https://github.com/serde-rs/serde/pull/302#discussion_r61880068","pull_request_url":"https://api.github.com/repos/serde-rs/serde/pulls/302","_links":{"self":{"href":"https://api.github.com/repos/serde-rs/serde/pulls/comments/61880068"},"html":{"href":"https://github.com/serde-rs/serde/pull/302#discussion_r61880068"},"pull_request":{"href":"https://api.github.com/repos/serde-rs/serde/pulls/302"}}},"pull_request":{"url":"https://api.github.com/repos/serde-rs/serde/pulls/302","id":68496023,"html_url":"https://github.com/serde-rs/serde/pull/302","diff_url":"https://github.com/serde-rs/serde/pull/302.diff","patch_url":"https://github.com/serde-rs/serde/pull/302.patch","issue_url":"https://api.github.com/repos/serde-rs/serde/issues/302","number":302,"state":"open","locked":false,"title":"Enable use in no_std environments","user":{"login":"cmr","id":704250,"avatar_url":"https://avatars.githubusercontent.com/u/704250?v=3","gravatar_id":"","url":"https://api.github.com/users/cmr","html_url":"https://github.com/cmr","followers_url":"https://api.github.com/users/cmr/followers","following_url":"https://api.github.com/users/cmr/following{/other_user}","gists_url":"https://api.github.com/users/cmr/gists{/gist_id}","starred_url":"https://api.github.com/users/cmr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmr/subscriptions","organizations_url":"https://api.github.com/users/cmr/orgs","repos_url":"https://api.github.com/users/cmr/repos","events_url":"https://api.github.com/users/cmr/events{/privacy}","received_events_url":"https://api.github.com/users/cmr/received_events","type":"User","site_admin":false},"body":"These changes are fairly invasive to imports and uses of non-libcore types,\nbut allow for some or none of the freestanding crates (core, rustc_unicode,\nalloc, collections) to be supported by serde.","created_at":"2016-05-01T13:31:11Z","updated_at":"2016-05-03T13:25:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"be3b0ce70948404d63732f93c64b3d73bcc6e81b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/serde-rs/serde/pulls/302/commits","review_comments_url":"https://api.github.com/repos/serde-rs/serde/pulls/302/comments","review_comment_url":"https://api.github.com/repos/serde-rs/serde/pulls/comments{/number}","comments_url":"https://api.github.com/repos/serde-rs/serde/issues/302/comments","statuses_url":"https://api.github.com/repos/serde-rs/serde/statuses/d096f44af5142d701d16f52aaf313e316126a7d2","head":{"label":"cmr:no_std","ref":"no_std","sha":"d096f44af5142d701d16f52aaf313e316126a7d2","user":{"login":"cmr","id":704250,"avatar_url":"https://avatars.githubusercontent.com/u/704250?v=3","gravatar_id":"","url":"https://api.github.com/users/cmr","html_url":"https://github.com/cmr","followers_url":"https://api.github.com/users/cmr/followers","following_url":"https://api.github.com/users/cmr/following{/other_user}","gists_url":"https://api.github.com/users/cmr/gists{/gist_id}","starred_url":"https://api.github.com/users/cmr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmr/subscriptions","organizations_url":"https://api.github.com/users/cmr/orgs","repos_url":"https://api.github.com/users/cmr/repos","events_url":"https://api.github.com/users/cmr/events{/privacy}","received_events_url":"https://api.github.com/users/cmr/received_events","type":"User","site_admin":false},"repo":{"id":57593770,"name":"serde","full_name":"cmr/serde","owner":{"login":"cmr","id":704250,"avatar_url":"https://avatars.githubusercontent.com/u/704250?v=3","gravatar_id":"","url":"https://api.github.com/users/cmr","html_url":"https://github.com/cmr","followers_url":"https://api.github.com/users/cmr/followers","following_url":"https://api.github.com/users/cmr/following{/other_user}","gists_url":"https://api.github.com/users/cmr/gists{/gist_id}","starred_url":"https://api.github.com/users/cmr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmr/subscriptions","organizations_url":"https://api.github.com/users/cmr/orgs","repos_url":"https://api.github.com/users/cmr/repos","events_url":"https://api.github.com/users/cmr/events{/privacy}","received_events_url":"https://api.github.com/users/cmr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cmr/serde","description":"Rust serialization","fork":true,"url":"https://api.github.com/repos/cmr/serde","forks_url":"https://api.github.com/repos/cmr/serde/forks","keys_url":"https://api.github.com/repos/cmr/serde/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cmr/serde/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cmr/serde/teams","hooks_url":"https://api.github.com/repos/cmr/serde/hooks","issue_events_url":"https://api.github.com/repos/cmr/serde/issues/events{/number}","events_url":"https://api.github.com/repos/cmr/serde/events","assignees_url":"https://api.github.com/repos/cmr/serde/assignees{/user}","branches_url":"https://api.github.com/repos/cmr/serde/branches{/branch}","tags_url":"https://api.github.com/repos/cmr/serde/tags","blobs_url":"https://api.github.com/repos/cmr/serde/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cmr/serde/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cmr/serde/git/refs{/sha}","trees_url":"https://api.github.com/repos/cmr/serde/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cmr/serde/statuses/{sha}","languages_url":"https://api.github.com/repos/cmr/serde/languages","stargazers_url":"https://api.github.com/repos/cmr/serde/stargazers","contributors_url":"https://api.github.com/repos/cmr/serde/contributors","subscribers_url":"https://api.github.com/repos/cmr/serde/subscribers","subscription_url":"https://api.github.com/repos/cmr/serde/subscription","commits_url":"https://api.github.com/repos/cmr/serde/commits{/sha}","git_commits_url":"https://api.github.com/repos/cmr/serde/git/commits{/sha}","comments_url":"https://api.github.com/repos/cmr/serde/comments{/number}","issue_comment_url":"https://api.github.com/repos/cmr/serde/issues/comments{/number}","contents_url":"https://api.github.com/repos/cmr/serde/contents/{+path}","compare_url":"https://api.github.com/repos/cmr/serde/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cmr/serde/merges","archive_url":"https://api.github.com/repos/cmr/serde/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cmr/serde/downloads","issues_url":"https://api.github.com/repos/cmr/serde/issues{/number}","pulls_url":"https://api.github.com/repos/cmr/serde/pulls{/number}","milestones_url":"https://api.github.com/repos/cmr/serde/milestones{/number}","notifications_url":"https://api.github.com/repos/cmr/serde/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cmr/serde/labels{/name}","releases_url":"https://api.github.com/repos/cmr/serde/releases{/id}","deployments_url":"https://api.github.com/repos/cmr/serde/deployments","created_at":"2016-05-01T10:11:37Z","updated_at":"2016-05-01T10:11:38Z","pushed_at":"2016-05-01T14:30:30Z","git_url":"git://github.com/cmr/serde.git","ssh_url":"git@github.com:cmr/serde.git","clone_url":"https://github.com/cmr/serde.git","svn_url":"https://github.com/cmr/serde","homepage":"","size":2781,"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":"serde-rs:master","ref":"master","sha":"a959073a811011040589e1c328f3e7fdbf1e860b","user":{"login":"serde-rs","id":11965399,"avatar_url":"https://avatars.githubusercontent.com/u/11965399?v=3","gravatar_id":"","url":"https://api.github.com/users/serde-rs","html_url":"https://github.com/serde-rs","followers_url":"https://api.github.com/users/serde-rs/followers","following_url":"https://api.github.com/users/serde-rs/following{/other_user}","gists_url":"https://api.github.com/users/serde-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/serde-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serde-rs/subscriptions","organizations_url":"https://api.github.com/users/serde-rs/orgs","repos_url":"https://api.github.com/users/serde-rs/repos","events_url":"https://api.github.com/users/serde-rs/events{/privacy}","received_events_url":"https://api.github.com/users/serde-rs/received_events","type":"Organization","site_admin":false},"repo":{"id":14367737,"name":"serde","full_name":"serde-rs/serde","owner":{"login":"serde-rs","id":11965399,"avatar_url":"https://avatars.githubusercontent.com/u/11965399?v=3","gravatar_id":"","url":"https://api.github.com/users/serde-rs","html_url":"https://github.com/serde-rs","followers_url":"https://api.github.com/users/serde-rs/followers","following_url":"https://api.github.com/users/serde-rs/following{/other_user}","gists_url":"https://api.github.com/users/serde-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/serde-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serde-rs/subscriptions","organizations_url":"https://api.github.com/users/serde-rs/orgs","repos_url":"https://api.github.com/users/serde-rs/repos","events_url":"https://api.github.com/users/serde-rs/events{/privacy}","received_events_url":"https://api.github.com/users/serde-rs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/serde-rs/serde","description":"Rust serialization","fork":false,"url":"https://api.github.com/repos/serde-rs/serde","forks_url":"https://api.github.com/repos/serde-rs/serde/forks","keys_url":"https://api.github.com/repos/serde-rs/serde/keys{/key_id}","collaborators_url":"https://api.github.com/repos/serde-rs/serde/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/serde-rs/serde/teams","hooks_url":"https://api.github.com/repos/serde-rs/serde/hooks","issue_events_url":"https://api.github.com/repos/serde-rs/serde/issues/events{/number}","events_url":"https://api.github.com/repos/serde-rs/serde/events","assignees_url":"https://api.github.com/repos/serde-rs/serde/assignees{/user}","branches_url":"https://api.github.com/repos/serde-rs/serde/branches{/branch}","tags_url":"https://api.github.com/repos/serde-rs/serde/tags","blobs_url":"https://api.github.com/repos/serde-rs/serde/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/serde-rs/serde/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/serde-rs/serde/git/refs{/sha}","trees_url":"https://api.github.com/repos/serde-rs/serde/git/trees{/sha}","statuses_url":"https://api.github.com/repos/serde-rs/serde/statuses/{sha}","languages_url":"https://api.github.com/repos/serde-rs/serde/languages","stargazers_url":"https://api.github.com/repos/serde-rs/serde/stargazers","contributors_url":"https://api.github.com/repos/serde-rs/serde/contributors","subscribers_url":"https://api.github.com/repos/serde-rs/serde/subscribers","subscription_url":"https://api.github.com/repos/serde-rs/serde/subscription","commits_url":"https://api.github.com/repos/serde-rs/serde/commits{/sha}","git_commits_url":"https://api.github.com/repos/serde-rs/serde/git/commits{/sha}","comments_url":"https://api.github.com/repos/serde-rs/serde/comments{/number}","issue_comment_url":"https://api.github.com/repos/serde-rs/serde/issues/comments{/number}","contents_url":"https://api.github.com/repos/serde-rs/serde/contents/{+path}","compare_url":"https://api.github.com/repos/serde-rs/serde/compare/{base}...{head}","merges_url":"https://api.github.com/repos/serde-rs/serde/merges","archive_url":"https://api.github.com/repos/serde-rs/serde/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/serde-rs/serde/downloads","issues_url":"https://api.github.com/repos/serde-rs/serde/issues{/number}","pulls_url":"https://api.github.com/repos/serde-rs/serde/pulls{/number}","milestones_url":"https://api.github.com/repos/serde-rs/serde/milestones{/number}","notifications_url":"https://api.github.com/repos/serde-rs/serde/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/serde-rs/serde/labels{/name}","releases_url":"https://api.github.com/repos/serde-rs/serde/releases{/id}","deployments_url":"https://api.github.com/repos/serde-rs/serde/deployments","created_at":"2013-11-13T15:22:58Z","updated_at":"2016-05-01T17:21:17Z","pushed_at":"2016-05-03T05:25:49Z","git_url":"git://github.com/serde-rs/serde.git","ssh_url":"git@github.com:serde-rs/serde.git","clone_url":"https://github.com/serde-rs/serde.git","svn_url":"https://github.com/serde-rs/serde","homepage":"","size":3048,"stargazers_count":369,"watchers_count":369,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":73,"mirror_url":null,"open_issues_count":47,"forks":73,"open_issues":47,"watchers":369,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/serde-rs/serde/pulls/302"},"html":{"href":"https://github.com/serde-rs/serde/pull/302"},"issue":{"href":"https://api.github.com/repos/serde-rs/serde/issues/302"},"comments":{"href":"https://api.github.com/repos/serde-rs/serde/issues/302/comments"},"review_comments":{"href":"https://api.github.com/repos/serde-rs/serde/pulls/302/comments"},"review_comment":{"href":"https://api.github.com/repos/serde-rs/serde/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/serde-rs/serde/pulls/302/commits"},"statuses":{"href":"https://api.github.com/repos/serde-rs/serde/statuses/d096f44af5142d701d16f52aaf313e316126a7d2"}}}}