{"action":"created","comment":{"url":"https://api.github.com/repos/paypal/cascade/pulls/comments/26884806","id":26884806,"diff_hunk":"@@ -92,6 +94,15 @@ package object option {\n     def toFuture(t: => Throwable): Future[T] = {\n       option.map(Future.successful).getOrElse(Future.failed(t))\n     }\n+\n+    /**\n+     * Map the Option into Future success/fail states: if the Option is a Some, yield a Future with its value;\n+     * if the Option is None, yield a Future with NoSuchElementException as its failure state\n+     * @return the Future-wrapped value of this Option, or a Future-wrapped failure Throwable\n+     */\n+    def toFuture: Future[T] = {","path":"common/src/main/scala/com/paypal/cascade/common/option/option.scala","position":19,"original_position":19,"commit_id":"54f01f68f4e490dbc6231641784427c361d2501d","original_commit_id":"54f01f68f4e490dbc6231641784427c361d2501d","user":{"login":"taylorleese","id":202401,"avatar_url":"https://avatars.githubusercontent.com/u/202401?v=3","gravatar_id":"","url":"https://api.github.com/users/taylorleese","html_url":"https://github.com/taylorleese","followers_url":"https://api.github.com/users/taylorleese/followers","following_url":"https://api.github.com/users/taylorleese/following{/other_user}","gists_url":"https://api.github.com/users/taylorleese/gists{/gist_id}","starred_url":"https://api.github.com/users/taylorleese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taylorleese/subscriptions","organizations_url":"https://api.github.com/users/taylorleese/orgs","repos_url":"https://api.github.com/users/taylorleese/repos","events_url":"https://api.github.com/users/taylorleese/events{/privacy}","received_events_url":"https://api.github.com/users/taylorleese/received_events","type":"User","site_admin":false},"body":"@michalkowol @2rs2ts I would actually expect this to return a ```Future[Option[T]]```. Getting a result of a failed future without passing in a function that creates a a throwable like on line 94 would be a bit of a surprise to me.","created_at":"2015-03-20T23:40:06Z","updated_at":"2015-03-20T23:40:06Z","html_url":"https://github.com/paypal/cascade/pull/107#discussion_r26884806","pull_request_url":"https://api.github.com/repos/paypal/cascade/pulls/107","_links":{"self":{"href":"https://api.github.com/repos/paypal/cascade/pulls/comments/26884806"},"html":{"href":"https://github.com/paypal/cascade/pull/107#discussion_r26884806"},"pull_request":{"href":"https://api.github.com/repos/paypal/cascade/pulls/107"}}},"pull_request":{"url":"https://api.github.com/repos/paypal/cascade/pulls/107","id":31172038,"html_url":"https://github.com/paypal/cascade/pull/107","diff_url":"https://github.com/paypal/cascade/pull/107.diff","patch_url":"https://github.com/paypal/cascade/pull/107.patch","issue_url":"https://api.github.com/repos/paypal/cascade/issues/107","number":107,"state":"closed","locked":false,"title":"Add f.mapFailure(new CustomException); Add option.toFuture (without throwable)","user":{"login":"michalkowol","id":789841,"avatar_url":"https://avatars.githubusercontent.com/u/789841?v=3","gravatar_id":"","url":"https://api.github.com/users/michalkowol","html_url":"https://github.com/michalkowol","followers_url":"https://api.github.com/users/michalkowol/followers","following_url":"https://api.github.com/users/michalkowol/following{/other_user}","gists_url":"https://api.github.com/users/michalkowol/gists{/gist_id}","starred_url":"https://api.github.com/users/michalkowol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalkowol/subscriptions","organizations_url":"https://api.github.com/users/michalkowol/orgs","repos_url":"https://api.github.com/users/michalkowol/repos","events_url":"https://api.github.com/users/michalkowol/events{/privacy}","received_events_url":"https://api.github.com/users/michalkowol/received_events","type":"User","site_admin":false},"body":"```\r\nval option = Option(7)\r\noption.toFuture\r\n\r\nval future = Future(7)\r\nfuture.mapFailure(new Exception(\"foo\"))\r\n```","created_at":"2015-03-13T23:20:58Z","updated_at":"2015-03-20T23:40:06Z","closed_at":"2015-03-15T14:28:03Z","merged_at":"2015-03-15T14:28:03Z","merge_commit_sha":"57fe939c0787021a93dfcc79f695eafbb94bb0c1","assignee":{"login":"2rs2ts","id":578891,"avatar_url":"https://avatars.githubusercontent.com/u/578891?v=3","gravatar_id":"","url":"https://api.github.com/users/2rs2ts","html_url":"https://github.com/2rs2ts","followers_url":"https://api.github.com/users/2rs2ts/followers","following_url":"https://api.github.com/users/2rs2ts/following{/other_user}","gists_url":"https://api.github.com/users/2rs2ts/gists{/gist_id}","starred_url":"https://api.github.com/users/2rs2ts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2rs2ts/subscriptions","organizations_url":"https://api.github.com/users/2rs2ts/orgs","repos_url":"https://api.github.com/users/2rs2ts/repos","events_url":"https://api.github.com/users/2rs2ts/events{/privacy}","received_events_url":"https://api.github.com/users/2rs2ts/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/paypal/cascade/pulls/107/commits","review_comments_url":"https://api.github.com/repos/paypal/cascade/pulls/107/comments","review_comment_url":"https://api.github.com/repos/paypal/cascade/pulls/comments{/number}","comments_url":"https://api.github.com/repos/paypal/cascade/issues/107/comments","statuses_url":"https://api.github.com/repos/paypal/cascade/statuses/54f01f68f4e490dbc6231641784427c361d2501d","head":{"label":"michalkowol:develop","ref":"develop","sha":"54f01f68f4e490dbc6231641784427c361d2501d","user":{"login":"michalkowol","id":789841,"avatar_url":"https://avatars.githubusercontent.com/u/789841?v=3","gravatar_id":"","url":"https://api.github.com/users/michalkowol","html_url":"https://github.com/michalkowol","followers_url":"https://api.github.com/users/michalkowol/followers","following_url":"https://api.github.com/users/michalkowol/following{/other_user}","gists_url":"https://api.github.com/users/michalkowol/gists{/gist_id}","starred_url":"https://api.github.com/users/michalkowol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalkowol/subscriptions","organizations_url":"https://api.github.com/users/michalkowol/orgs","repos_url":"https://api.github.com/users/michalkowol/repos","events_url":"https://api.github.com/users/michalkowol/events{/privacy}","received_events_url":"https://api.github.com/users/michalkowol/received_events","type":"User","site_admin":false},"repo":{"id":32182056,"name":"cascade","full_name":"michalkowol/cascade","owner":{"login":"michalkowol","id":789841,"avatar_url":"https://avatars.githubusercontent.com/u/789841?v=3","gravatar_id":"","url":"https://api.github.com/users/michalkowol","html_url":"https://github.com/michalkowol","followers_url":"https://api.github.com/users/michalkowol/followers","following_url":"https://api.github.com/users/michalkowol/following{/other_user}","gists_url":"https://api.github.com/users/michalkowol/gists{/gist_id}","starred_url":"https://api.github.com/users/michalkowol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalkowol/subscriptions","organizations_url":"https://api.github.com/users/michalkowol/orgs","repos_url":"https://api.github.com/users/michalkowol/repos","events_url":"https://api.github.com/users/michalkowol/events{/privacy}","received_events_url":"https://api.github.com/users/michalkowol/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/michalkowol/cascade","description":"Common Libraries & Patterns for Scala Apps @ PayPal","fork":true,"url":"https://api.github.com/repos/michalkowol/cascade","forks_url":"https://api.github.com/repos/michalkowol/cascade/forks","keys_url":"https://api.github.com/repos/michalkowol/cascade/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michalkowol/cascade/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michalkowol/cascade/teams","hooks_url":"https://api.github.com/repos/michalkowol/cascade/hooks","issue_events_url":"https://api.github.com/repos/michalkowol/cascade/issues/events{/number}","events_url":"https://api.github.com/repos/michalkowol/cascade/events","assignees_url":"https://api.github.com/repos/michalkowol/cascade/assignees{/user}","branches_url":"https://api.github.com/repos/michalkowol/cascade/branches{/branch}","tags_url":"https://api.github.com/repos/michalkowol/cascade/tags","blobs_url":"https://api.github.com/repos/michalkowol/cascade/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michalkowol/cascade/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michalkowol/cascade/git/refs{/sha}","trees_url":"https://api.github.com/repos/michalkowol/cascade/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michalkowol/cascade/statuses/{sha}","languages_url":"https://api.github.com/repos/michalkowol/cascade/languages","stargazers_url":"https://api.github.com/repos/michalkowol/cascade/stargazers","contributors_url":"https://api.github.com/repos/michalkowol/cascade/contributors","subscribers_url":"https://api.github.com/repos/michalkowol/cascade/subscribers","subscription_url":"https://api.github.com/repos/michalkowol/cascade/subscription","commits_url":"https://api.github.com/repos/michalkowol/cascade/commits{/sha}","git_commits_url":"https://api.github.com/repos/michalkowol/cascade/git/commits{/sha}","comments_url":"https://api.github.com/repos/michalkowol/cascade/comments{/number}","issue_comment_url":"https://api.github.com/repos/michalkowol/cascade/issues/comments{/number}","contents_url":"https://api.github.com/repos/michalkowol/cascade/contents/{+path}","compare_url":"https://api.github.com/repos/michalkowol/cascade/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michalkowol/cascade/merges","archive_url":"https://api.github.com/repos/michalkowol/cascade/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michalkowol/cascade/downloads","issues_url":"https://api.github.com/repos/michalkowol/cascade/issues{/number}","pulls_url":"https://api.github.com/repos/michalkowol/cascade/pulls{/number}","milestones_url":"https://api.github.com/repos/michalkowol/cascade/milestones{/number}","notifications_url":"https://api.github.com/repos/michalkowol/cascade/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michalkowol/cascade/labels{/name}","releases_url":"https://api.github.com/repos/michalkowol/cascade/releases{/id}","created_at":"2015-03-13T21:35:25Z","updated_at":"2015-03-15T22:46:34Z","pushed_at":"2015-03-15T22:48:40Z","git_url":"git://github.com/michalkowol/cascade.git","ssh_url":"git@github.com:michalkowol/cascade.git","clone_url":"https://github.com/michalkowol/cascade.git","svn_url":"https://github.com/michalkowol/cascade","homepage":null,"size":1950,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"paypal:develop","ref":"develop","sha":"aa872fda91b0c39edf4bcf2a0d7a9c5e2bc8b224","user":{"login":"paypal","id":476675,"avatar_url":"https://avatars.githubusercontent.com/u/476675?v=3","gravatar_id":"","url":"https://api.github.com/users/paypal","html_url":"https://github.com/paypal","followers_url":"https://api.github.com/users/paypal/followers","following_url":"https://api.github.com/users/paypal/following{/other_user}","gists_url":"https://api.github.com/users/paypal/gists{/gist_id}","starred_url":"https://api.github.com/users/paypal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paypal/subscriptions","organizations_url":"https://api.github.com/users/paypal/orgs","repos_url":"https://api.github.com/users/paypal/repos","events_url":"https://api.github.com/users/paypal/events{/privacy}","received_events_url":"https://api.github.com/users/paypal/received_events","type":"Organization","site_admin":false},"repo":{"id":23116994,"name":"cascade","full_name":"paypal/cascade","owner":{"login":"paypal","id":476675,"avatar_url":"https://avatars.githubusercontent.com/u/476675?v=3","gravatar_id":"","url":"https://api.github.com/users/paypal","html_url":"https://github.com/paypal","followers_url":"https://api.github.com/users/paypal/followers","following_url":"https://api.github.com/users/paypal/following{/other_user}","gists_url":"https://api.github.com/users/paypal/gists{/gist_id}","starred_url":"https://api.github.com/users/paypal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paypal/subscriptions","organizations_url":"https://api.github.com/users/paypal/orgs","repos_url":"https://api.github.com/users/paypal/repos","events_url":"https://api.github.com/users/paypal/events{/privacy}","received_events_url":"https://api.github.com/users/paypal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/paypal/cascade","description":"Common Libraries & Patterns for Scala Apps @ PayPal","fork":false,"url":"https://api.github.com/repos/paypal/cascade","forks_url":"https://api.github.com/repos/paypal/cascade/forks","keys_url":"https://api.github.com/repos/paypal/cascade/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paypal/cascade/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paypal/cascade/teams","hooks_url":"https://api.github.com/repos/paypal/cascade/hooks","issue_events_url":"https://api.github.com/repos/paypal/cascade/issues/events{/number}","events_url":"https://api.github.com/repos/paypal/cascade/events","assignees_url":"https://api.github.com/repos/paypal/cascade/assignees{/user}","branches_url":"https://api.github.com/repos/paypal/cascade/branches{/branch}","tags_url":"https://api.github.com/repos/paypal/cascade/tags","blobs_url":"https://api.github.com/repos/paypal/cascade/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paypal/cascade/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paypal/cascade/git/refs{/sha}","trees_url":"https://api.github.com/repos/paypal/cascade/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paypal/cascade/statuses/{sha}","languages_url":"https://api.github.com/repos/paypal/cascade/languages","stargazers_url":"https://api.github.com/repos/paypal/cascade/stargazers","contributors_url":"https://api.github.com/repos/paypal/cascade/contributors","subscribers_url":"https://api.github.com/repos/paypal/cascade/subscribers","subscription_url":"https://api.github.com/repos/paypal/cascade/subscription","commits_url":"https://api.github.com/repos/paypal/cascade/commits{/sha}","git_commits_url":"https://api.github.com/repos/paypal/cascade/git/commits{/sha}","comments_url":"https://api.github.com/repos/paypal/cascade/comments{/number}","issue_comment_url":"https://api.github.com/repos/paypal/cascade/issues/comments{/number}","contents_url":"https://api.github.com/repos/paypal/cascade/contents/{+path}","compare_url":"https://api.github.com/repos/paypal/cascade/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paypal/cascade/merges","archive_url":"https://api.github.com/repos/paypal/cascade/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paypal/cascade/downloads","issues_url":"https://api.github.com/repos/paypal/cascade/issues{/number}","pulls_url":"https://api.github.com/repos/paypal/cascade/pulls{/number}","milestones_url":"https://api.github.com/repos/paypal/cascade/milestones{/number}","notifications_url":"https://api.github.com/repos/paypal/cascade/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paypal/cascade/labels{/name}","releases_url":"https://api.github.com/repos/paypal/cascade/releases{/id}","created_at":"2014-08-19T16:18:16Z","updated_at":"2015-03-18T18:44:28Z","pushed_at":"2015-03-15T14:28:03Z","git_url":"git://github.com/paypal/cascade.git","ssh_url":"git@github.com:paypal/cascade.git","clone_url":"https://github.com/paypal/cascade.git","svn_url":"https://github.com/paypal/cascade","homepage":null,"size":3610,"stargazers_count":100,"watchers_count":100,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":12,"mirror_url":null,"open_issues_count":15,"forks":12,"open_issues":15,"watchers":100,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/paypal/cascade/pulls/107"},"html":{"href":"https://github.com/paypal/cascade/pull/107"},"issue":{"href":"https://api.github.com/repos/paypal/cascade/issues/107"},"comments":{"href":"https://api.github.com/repos/paypal/cascade/issues/107/comments"},"review_comments":{"href":"https://api.github.com/repos/paypal/cascade/pulls/107/comments"},"review_comment":{"href":"https://api.github.com/repos/paypal/cascade/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/paypal/cascade/pulls/107/commits"},"statuses":{"href":"https://api.github.com/repos/paypal/cascade/statuses/54f01f68f4e490dbc6231641784427c361d2501d"}}}}