{"action":"created","issue":{"url":"https://api.github.com/repos/vapor/async/issues/51","repository_url":"https://api.github.com/repos/vapor/async","labels_url":"https://api.github.com/repos/vapor/async/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/vapor/async/issues/51/comments","events_url":"https://api.github.com/repos/vapor/async/issues/51/events","html_url":"https://github.com/vapor/async/pull/51","id":290324479,"number":51,"title":"omit  where expectation is the same","user":{"login":"tanner0101","id":1342803,"avatar_url":"https://avatars2.githubusercontent.com/u/1342803?v=4","gravatar_id":"","url":"https://api.github.com/users/tanner0101","html_url":"https://github.com/tanner0101","followers_url":"https://api.github.com/users/tanner0101/followers","following_url":"https://api.github.com/users/tanner0101/following{/other_user}","gists_url":"https://api.github.com/users/tanner0101/gists{/gist_id}","starred_url":"https://api.github.com/users/tanner0101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanner0101/subscriptions","organizations_url":"https://api.github.com/users/tanner0101/orgs","repos_url":"https://api.github.com/users/tanner0101/repos","events_url":"https://api.github.com/users/tanner0101/events{/privacy}","received_events_url":"https://api.github.com/users/tanner0101/received_events","type":"User","site_admin":false},"labels":[{"id":754530552,"url":"https://api.github.com/repos/vapor/async/labels/enhancement","name":"enhancement","color":"1d76db","default":true}],"state":"closed","locked":false,"assignee":{"login":"tanner0101","id":1342803,"avatar_url":"https://avatars2.githubusercontent.com/u/1342803?v=4","gravatar_id":"","url":"https://api.github.com/users/tanner0101","html_url":"https://github.com/tanner0101","followers_url":"https://api.github.com/users/tanner0101/followers","following_url":"https://api.github.com/users/tanner0101/following{/other_user}","gists_url":"https://api.github.com/users/tanner0101/gists{/gist_id}","starred_url":"https://api.github.com/users/tanner0101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanner0101/subscriptions","organizations_url":"https://api.github.com/users/tanner0101/orgs","repos_url":"https://api.github.com/users/tanner0101/repos","events_url":"https://api.github.com/users/tanner0101/events{/privacy}","received_events_url":"https://api.github.com/users/tanner0101/received_events","type":"User","site_admin":false},"assignees":[{"login":"tanner0101","id":1342803,"avatar_url":"https://avatars2.githubusercontent.com/u/1342803?v=4","gravatar_id":"","url":"https://api.github.com/users/tanner0101","html_url":"https://github.com/tanner0101","followers_url":"https://api.github.com/users/tanner0101/followers","following_url":"https://api.github.com/users/tanner0101/following{/other_user}","gists_url":"https://api.github.com/users/tanner0101/gists{/gist_id}","starred_url":"https://api.github.com/users/tanner0101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanner0101/subscriptions","organizations_url":"https://api.github.com/users/tanner0101/orgs","repos_url":"https://api.github.com/users/tanner0101/repos","events_url":"https://api.github.com/users/tanner0101/events{/privacy}","received_events_url":"https://api.github.com/users/tanner0101/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/vapor/async/milestones/1","html_url":"https://github.com/vapor/async/milestone/1","labels_url":"https://api.github.com/repos/vapor/async/milestones/1/labels","id":2921861,"number":1,"title":"1.0","description":null,"creator":{"login":"tanner0101","id":1342803,"avatar_url":"https://avatars2.githubusercontent.com/u/1342803?v=4","gravatar_id":"","url":"https://api.github.com/users/tanner0101","html_url":"https://github.com/tanner0101","followers_url":"https://api.github.com/users/tanner0101/followers","following_url":"https://api.github.com/users/tanner0101/following{/other_user}","gists_url":"https://api.github.com/users/tanner0101/gists{/gist_id}","starred_url":"https://api.github.com/users/tanner0101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanner0101/subscriptions","organizations_url":"https://api.github.com/users/tanner0101/orgs","repos_url":"https://api.github.com/users/tanner0101/repos","events_url":"https://api.github.com/users/tanner0101/events{/privacy}","received_events_url":"https://api.github.com/users/tanner0101/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":35,"state":"open","created_at":"2017-11-18T22:27:09Z","updated_at":"2018-02-23T01:01:11Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2018-01-22T01:03:22Z","updated_at":"2018-02-23T01:01:32Z","closed_at":"2018-02-23T01:01:10Z","author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/vapor/async/pulls/51","html_url":"https://github.com/vapor/async/pull/51","diff_url":"https://github.com/vapor/async/pull/51.diff","patch_url":"https://github.com/vapor/async/pull/51.patch"},"body":"This allows for omitting the `to:` label (in an ambiguous-safe way) by limiting it to returns of the same expectation. This helps to cut down on unnecessary noise. \r\n\r\n```swift\r\nreturn asyncThing1().flatMap(to: Void.self) {\r\n    return asyncThing1()\r\n}.flatMap(to: Void.self) {\r\n    return asyncThing1()\r\n}.flatMap(to: Bool.self) {\r\n    return asyncThing2()\r\n}.flatMap(to: Bool.self) {\r\n    return asyncThing2()\r\n}\r\n```\r\n\r\nBecomes:\r\n\r\n\r\n```swift\r\nreturn asyncThing1().flatMap {\r\n    return asyncThing1()\r\n}.flatMap {\r\n    return asyncThing1()\r\n}.flatMap(to: Bool.self) {\r\n    return asyncThing2()\r\n}.flatMap {\r\n    return asyncThing2()\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/vapor/async/issues/comments/367875412","html_url":"https://github.com/vapor/async/pull/51#issuecomment-367875412","issue_url":"https://api.github.com/repos/vapor/async/issues/51","id":367875412,"user":{"login":"tanner0101","id":1342803,"avatar_url":"https://avatars2.githubusercontent.com/u/1342803?v=4","gravatar_id":"","url":"https://api.github.com/users/tanner0101","html_url":"https://github.com/tanner0101","followers_url":"https://api.github.com/users/tanner0101/followers","following_url":"https://api.github.com/users/tanner0101/following{/other_user}","gists_url":"https://api.github.com/users/tanner0101/gists{/gist_id}","starred_url":"https://api.github.com/users/tanner0101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanner0101/subscriptions","organizations_url":"https://api.github.com/users/tanner0101/orgs","repos_url":"https://api.github.com/users/tanner0101/repos","events_url":"https://api.github.com/users/tanner0101/events{/privacy}","received_events_url":"https://api.github.com/users/tanner0101/received_events","type":"User","site_admin":false},"created_at":"2018-02-23T01:01:32Z","updated_at":"2018-02-23T01:01:32Z","author_association":"OWNER","body":"Closing since it seems unpopular. Counter argument is that the inconsistency will confuse newcomers. "}}
{"actor":{"display_login":"tanner0101"}}