{"action":"created","issue":{"url":"https://api.github.com/repos/utkarshkukreti/select.rs/issues/10","repository_url":"https://api.github.com/repos/utkarshkukreti/select.rs","labels_url":"https://api.github.com/repos/utkarshkukreti/select.rs/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/utkarshkukreti/select.rs/issues/10/comments","events_url":"https://api.github.com/repos/utkarshkukreti/select.rs/issues/10/events","html_url":"https://github.com/utkarshkukreti/select.rs/pull/10","id":163664898,"number":10,"title":"Implement From<String> for Document","user":{"login":"aleksanb","id":1413365,"avatar_url":"https://avatars.githubusercontent.com/u/1413365?v=3","gravatar_id":"","url":"https://api.github.com/users/aleksanb","html_url":"https://github.com/aleksanb","followers_url":"https://api.github.com/users/aleksanb/followers","following_url":"https://api.github.com/users/aleksanb/following{/other_user}","gists_url":"https://api.github.com/users/aleksanb/gists{/gist_id}","starred_url":"https://api.github.com/users/aleksanb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleksanb/subscriptions","organizations_url":"https://api.github.com/users/aleksanb/orgs","repos_url":"https://api.github.com/users/aleksanb/repos","events_url":"https://api.github.com/users/aleksanb/events{/privacy}","received_events_url":"https://api.github.com/users/aleksanb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-04T12:15:53Z","updated_at":"2016-07-06T15:49:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/utkarshkukreti/select.rs/pulls/10","html_url":"https://github.com/utkarshkukreti/select.rs/pull/10","diff_url":"https://github.com/utkarshkukreti/select.rs/pull/10.diff","patch_url":"https://github.com/utkarshkukreti/select.rs/pull/10.patch"},"body":"Currently, one cannot create a Document from a String,\r\nas is the case when reading a response from Hyper into a String.\r\nWith From<String>, this is now possible.\r\n\r\nExample of new allowed behaviour:\r\n```\r\nlet client = hyper::Client::new();\r\nlet mut response = try!(client.get(&request_url).send());\r\nlet mut body = String::new();\r\ntry!(response.read_to_string(&mut body));\r\n\r\nlet dom = Document::from(body);\r\n```"},"comment":{"url":"https://api.github.com/repos/utkarshkukreti/select.rs/issues/comments/230814987","html_url":"https://github.com/utkarshkukreti/select.rs/pull/10#issuecomment-230814987","issue_url":"https://api.github.com/repos/utkarshkukreti/select.rs/issues/10","id":230814987,"user":{"login":"utkarshkukreti","id":217126,"avatar_url":"https://avatars.githubusercontent.com/u/217126?v=3","gravatar_id":"","url":"https://api.github.com/users/utkarshkukreti","html_url":"https://github.com/utkarshkukreti","followers_url":"https://api.github.com/users/utkarshkukreti/followers","following_url":"https://api.github.com/users/utkarshkukreti/following{/other_user}","gists_url":"https://api.github.com/users/utkarshkukreti/gists{/gist_id}","starred_url":"https://api.github.com/users/utkarshkukreti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utkarshkukreti/subscriptions","organizations_url":"https://api.github.com/users/utkarshkukreti/orgs","repos_url":"https://api.github.com/users/utkarshkukreti/repos","events_url":"https://api.github.com/users/utkarshkukreti/events{/privacy}","received_events_url":"https://api.github.com/users/utkarshkukreti/received_events","type":"User","site_admin":false},"created_at":"2016-07-06T15:49:58Z","updated_at":"2016-07-06T15:49:58Z","body":">  Should I or you implement it?\r\n\r\nI'll only have time to do it later this week, or if you want to, you could send a PR. A test would also be nice (You could use `std::io::Cursor` to create a `Read` from bytes). I would be happy to help in any way I can.\r\n\r\nI believe the signature would look like:\r\n\r\n    fn from_read<R: Read>(r: R) -> std::io::Result<Document>\r\n\r\n> Regarding the first comment, you can't currently do\r\n\r\nAh, looks like just `&` is not enough. Please try this instead:\r\n\r\n    let doc = Document::from(&*body);"}}
{"actor":{"display_login":"utkarshkukreti"}}