{"action":"created","issue":{"url":"https://api.github.com/repos/briansmith/untrusted/issues/2","repository_url":"https://api.github.com/repos/briansmith/untrusted","labels_url":"https://api.github.com/repos/briansmith/untrusted/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/briansmith/untrusted/issues/2/comments","events_url":"https://api.github.com/repos/briansmith/untrusted/issues/2/events","html_url":"https://github.com/briansmith/untrusted/pull/2","id":164719492,"number":2,"title":"Add doc examples for most `untrusted::Input` methods.","user":{"login":"frewsxcv","id":416575,"avatar_url":"https://avatars.githubusercontent.com/u/416575?v=3","gravatar_id":"","url":"https://api.github.com/users/frewsxcv","html_url":"https://github.com/frewsxcv","followers_url":"https://api.github.com/users/frewsxcv/followers","following_url":"https://api.github.com/users/frewsxcv/following{/other_user}","gists_url":"https://api.github.com/users/frewsxcv/gists{/gist_id}","starred_url":"https://api.github.com/users/frewsxcv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frewsxcv/subscriptions","organizations_url":"https://api.github.com/users/frewsxcv/orgs","repos_url":"https://api.github.com/users/frewsxcv/repos","events_url":"https://api.github.com/users/frewsxcv/events{/privacy}","received_events_url":"https://api.github.com/users/frewsxcv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-10T15:04:40Z","updated_at":"2016-07-10T18:55:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/briansmith/untrusted/pulls/2","html_url":"https://github.com/briansmith/untrusted/pull/2","diff_url":"https://github.com/briansmith/untrusted/pull/2.diff","patch_url":"https://github.com/briansmith/untrusted/pull/2.patch"},"body":"I agree to license my contributions to each file under the terms given\nat the top of each file I changed."},"comment":{"url":"https://api.github.com/repos/briansmith/untrusted/issues/comments/231604708","html_url":"https://github.com/briansmith/untrusted/pull/2#issuecomment-231604708","issue_url":"https://api.github.com/repos/briansmith/untrusted/issues/2","id":231604708,"user":{"login":"briansmith","id":16816,"avatar_url":"https://avatars.githubusercontent.com/u/16816?v=3","gravatar_id":"","url":"https://api.github.com/users/briansmith","html_url":"https://github.com/briansmith","followers_url":"https://api.github.com/users/briansmith/followers","following_url":"https://api.github.com/users/briansmith/following{/other_user}","gists_url":"https://api.github.com/users/briansmith/gists{/gist_id}","starred_url":"https://api.github.com/users/briansmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briansmith/subscriptions","organizations_url":"https://api.github.com/users/briansmith/orgs","repos_url":"https://api.github.com/users/briansmith/repos","events_url":"https://api.github.com/users/briansmith/events{/privacy}","received_events_url":"https://api.github.com/users/briansmith/received_events","type":"User","site_admin":false},"created_at":"2016-07-10T18:55:15Z","updated_at":"2016-07-10T18:55:15Z","body":"Thanks for this.\r\n\r\nFirst, I think that your examples would be great to have as minimal unit tests. So, I suggest moving them to tests instead.\r\n\r\nOne of the problems that `untrusted::Input` tries to solve is DoS caused by panics. So, while I totally understand what you're trying to do here, I don't think that these code samples are actually good models for people to follow, because `assert!()` and `assert_eq!()` panic. Do you see what I mean here? (Sorry it's probably not very clear.)\r\n\r\nSo, instead, I think it would be better for the documentation to do similar stuff, but without using panicing stuff. e.g.\r\n\r\n```rust\r\nif a.is_empty() {\r\n    return Err(());\r\n}\r\n```\r\n\r\nAgain, thanks for submitting this."}}
{"actor":{"display_login":"briansmith"}}