{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/2425","repository_url":"https://api.github.com/repos/rust-lang/rfcs","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2425/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2425/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2425/events","html_url":"https://github.com/rust-lang/rfcs/issues/2425","id":318643486,"number":2425,"title":"Sugar for into","user":{"login":"SoniEx2","id":1779619,"avatar_url":"https://avatars2.githubusercontent.com/u/1779619?v=4","gravatar_id":"","url":"https://api.github.com/users/SoniEx2","html_url":"https://github.com/SoniEx2","followers_url":"https://api.github.com/users/SoniEx2/followers","following_url":"https://api.github.com/users/SoniEx2/following{/other_user}","gists_url":"https://api.github.com/users/SoniEx2/gists{/gist_id}","starred_url":"https://api.github.com/users/SoniEx2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SoniEx2/subscriptions","organizations_url":"https://api.github.com/users/SoniEx2/orgs","repos_url":"https://api.github.com/users/SoniEx2/repos","events_url":"https://api.github.com/users/SoniEx2/events{/privacy}","received_events_url":"https://api.github.com/users/SoniEx2/received_events","type":"User","site_admin":false},"labels":[{"id":211667886,"url":"https://api.github.com/repos/rust-lang/rfcs/labels/T-lang","name":"T-lang","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2018-04-28T15:02:03Z","updated_at":"2018-05-10T15:17:45Z","closed_at":null,"author_association":"NONE","body":"It would be nice to have syntax sugar for .into().\r\n\r\n```rust\r\nlet s: String = \"hello world\"!;\r\n```\r\n\r\nOther examples: (edited because previous example didn't actually make sense)\r\n\r\n```rust\r\n// assuming Result<T, E> implemented From<T>\r\nfn write_all(x: Data) -> Result<()> {\r\n    while !x.is_empty() {\r\n        write_data(&mut x)?\r\n    }\r\n    ()!\r\n}\r\n```\r\n\r\nRelated: #2416 \r\n\r\nThis syntax could also be used for auto-Ok() but then idk how that would work."},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/388085541","html_url":"https://github.com/rust-lang/rfcs/issues/2425#issuecomment-388085541","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2425","id":388085541,"user":{"login":"SoniEx2","id":1779619,"avatar_url":"https://avatars2.githubusercontent.com/u/1779619?v=4","gravatar_id":"","url":"https://api.github.com/users/SoniEx2","html_url":"https://github.com/SoniEx2","followers_url":"https://api.github.com/users/SoniEx2/followers","following_url":"https://api.github.com/users/SoniEx2/following{/other_user}","gists_url":"https://api.github.com/users/SoniEx2/gists{/gist_id}","starred_url":"https://api.github.com/users/SoniEx2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SoniEx2/subscriptions","organizations_url":"https://api.github.com/users/SoniEx2/orgs","repos_url":"https://api.github.com/users/SoniEx2/repos","events_url":"https://api.github.com/users/SoniEx2/events{/privacy}","received_events_url":"https://api.github.com/users/SoniEx2/received_events","type":"User","site_admin":false},"created_at":"2018-05-10T15:17:45Z","updated_at":"2018-05-10T15:17:45Z","author_association":"NONE","body":"for the record, a lot of ppl are aggressively for Ok-wrapping, and it seems straight-up impossible to argue with them.\r\n\r\nso I'm trying to come up with a compromise: add something \"invisible and unclear\", aka `!`, that is still just as explicit as an explicit Ok."}}
{"actor":{"display_login":"SoniEx2"}}