{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/34857","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/34857/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/34857/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/34857/events","html_url":"https://github.com/rust-lang/rust/issues/34857","id":165942222,"number":34857,"title":"Add fs::read_to_string","user":{"login":"brson","id":147214,"avatar_url":"https://avatars.githubusercontent.com/u/147214?v=3","gravatar_id":"","url":"https://api.github.com/users/brson","html_url":"https://github.com/brson","followers_url":"https://api.github.com/users/brson/followers","following_url":"https://api.github.com/users/brson/following{/other_user}","gists_url":"https://api.github.com/users/brson/gists{/gist_id}","starred_url":"https://api.github.com/users/brson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brson/subscriptions","organizations_url":"https://api.github.com/users/brson/orgs","repos_url":"https://api.github.com/users/brson/repos","events_url":"https://api.github.com/users/brson/events{/privacy}","received_events_url":"https://api.github.com/users/brson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-io","name":"A-io","color":"d7e102"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-libs","name":"A-libs","color":"d7e102"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/I-enhancement","name":"I-enhancement","color":"e10c02"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/I-nominated","name":"I-nominated","color":"e10c02"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/I-papercut","name":"I-papercut","color":"e10c02"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/I-wishlist","name":"I-wishlist","color":"e10c02"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/T-libs","name":"T-libs","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-16T18:45:34Z","updated_at":"2016-07-16T20:16:43Z","closed_at":null,"body":"Every time I want to load the contents of a file to a `String` I think this same thing: \"there should be a fs::read_to_string\".\r\n\r\nIt looks like to me the most convenient way to do this once `?` is stable (which doesn't seem to be near) might be `File::open(path)?.read_to_string()?`, assuming you've got the `Read` trait imported. It's just not as nice.\r\n\r\nWe as @rust-lang/libs can be more aggressive about identifying and adding simple ergonomic improvements like this."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/233148968","html_url":"https://github.com/rust-lang/rust/issues/34857#issuecomment-233148968","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/34857","id":233148968,"user":{"login":"retep998","id":666308,"avatar_url":"https://avatars.githubusercontent.com/u/666308?v=3","gravatar_id":"","url":"https://api.github.com/users/retep998","html_url":"https://github.com/retep998","followers_url":"https://api.github.com/users/retep998/followers","following_url":"https://api.github.com/users/retep998/following{/other_user}","gists_url":"https://api.github.com/users/retep998/gists{/gist_id}","starred_url":"https://api.github.com/users/retep998/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/retep998/subscriptions","organizations_url":"https://api.github.com/users/retep998/orgs","repos_url":"https://api.github.com/users/retep998/repos","events_url":"https://api.github.com/users/retep998/events{/privacy}","received_events_url":"https://api.github.com/users/retep998/received_events","type":"User","site_admin":false},"created_at":"2016-07-16T20:16:43Z","updated_at":"2016-07-16T20:16:43Z","body":"What if we had a `read_to_vec` instead and then you convert that into `String`?"}}
{"actor":{"display_login":"retep998"}}