{"action":"created","comment":{"url":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments/54906243","id":54906243,"diff_hunk":"@@ -20,10 +20,10 @@ extension Array {\n         var t = [T]()\n         var u = [U]()\n         for e in self {\n-            if e is T {\n-                t.append(e as! T)\n-            } else {\n-                u.append(e as! U)\n+            if let e = e as? T {\n+                t.append(e)\n+            } else if let e = e as? U {\n+                u.append(e)","path":"Sources/Utility/ArrayExtensions.swift","position":11,"original_position":11,"commit_id":"98625072d134937c7db6ae95555d1ae186eb04cd","original_commit_id":"98625072d134937c7db6ae95555d1ae186eb04cd","user":{"login":"kostiakoval","id":1086260,"avatar_url":"https://avatars.githubusercontent.com/u/1086260?v=3","gravatar_id":"","url":"https://api.github.com/users/kostiakoval","html_url":"https://github.com/kostiakoval","followers_url":"https://api.github.com/users/kostiakoval/followers","following_url":"https://api.github.com/users/kostiakoval/following{/other_user}","gists_url":"https://api.github.com/users/kostiakoval/gists{/gist_id}","starred_url":"https://api.github.com/users/kostiakoval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kostiakoval/subscriptions","organizations_url":"https://api.github.com/users/kostiakoval/orgs","repos_url":"https://api.github.com/users/kostiakoval/repos","events_url":"https://api.github.com/users/kostiakoval/events{/privacy}","received_events_url":"https://api.github.com/users/kostiakoval/received_events","type":"User","site_admin":false},"body":"as for me if case let is to heavy\r\n","created_at":"2016-03-03T16:35:24Z","updated_at":"2016-03-03T16:35:24Z","html_url":"https://github.com/apple/swift-package-manager/pull/170#discussion_r54906243","pull_request_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/170","_links":{"self":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments/54906243"},"html":{"href":"https://github.com/apple/swift-package-manager/pull/170#discussion_r54906243"},"pull_request":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/170"}}},"pull_request":{"url":"https://api.github.com/repos/apple/swift-package-manager/pulls/170","id":61585515,"html_url":"https://github.com/apple/swift-package-manager/pull/170","diff_url":"https://github.com/apple/swift-package-manager/pull/170.diff","patch_url":"https://github.com/apple/swift-package-manager/pull/170.patch","issue_url":"https://api.github.com/repos/apple/swift-package-manager/issues/170","number":170,"state":"open","locked":false,"title":"Optionally bind elements before appending to Arrays","user":{"login":"ArtSabintsev","id":854860,"avatar_url":"https://avatars.githubusercontent.com/u/854860?v=3","gravatar_id":"","url":"https://api.github.com/users/ArtSabintsev","html_url":"https://github.com/ArtSabintsev","followers_url":"https://api.github.com/users/ArtSabintsev/followers","following_url":"https://api.github.com/users/ArtSabintsev/following{/other_user}","gists_url":"https://api.github.com/users/ArtSabintsev/gists{/gist_id}","starred_url":"https://api.github.com/users/ArtSabintsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArtSabintsev/subscriptions","organizations_url":"https://api.github.com/users/ArtSabintsev/orgs","repos_url":"https://api.github.com/users/ArtSabintsev/repos","events_url":"https://api.github.com/users/ArtSabintsev/events{/privacy}","received_events_url":"https://api.github.com/users/ArtSabintsev/received_events","type":"User","site_admin":false},"body":"This is a bit safer than the force-unwrap solution.","created_at":"2016-03-03T16:29:02Z","updated_at":"2016-03-03T16:35:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c3234b9318c34e6b55efcbf89c568d34e5ec8c0e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/170/commits","review_comments_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/170/comments","review_comment_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apple/swift-package-manager/issues/170/comments","statuses_url":"https://api.github.com/repos/apple/swift-package-manager/statuses/98625072d134937c7db6ae95555d1ae186eb04cd","head":{"label":"ArtSabintsev:improvement/Safer-ArrayExtensions","ref":"improvement/Safer-ArrayExtensions","sha":"98625072d134937c7db6ae95555d1ae186eb04cd","user":{"login":"ArtSabintsev","id":854860,"avatar_url":"https://avatars.githubusercontent.com/u/854860?v=3","gravatar_id":"","url":"https://api.github.com/users/ArtSabintsev","html_url":"https://github.com/ArtSabintsev","followers_url":"https://api.github.com/users/ArtSabintsev/followers","following_url":"https://api.github.com/users/ArtSabintsev/following{/other_user}","gists_url":"https://api.github.com/users/ArtSabintsev/gists{/gist_id}","starred_url":"https://api.github.com/users/ArtSabintsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArtSabintsev/subscriptions","organizations_url":"https://api.github.com/users/ArtSabintsev/orgs","repos_url":"https://api.github.com/users/ArtSabintsev/repos","events_url":"https://api.github.com/users/ArtSabintsev/events{/privacy}","received_events_url":"https://api.github.com/users/ArtSabintsev/received_events","type":"User","site_admin":false},"repo":{"id":53065174,"name":"swift-package-manager","full_name":"ArtSabintsev/swift-package-manager","owner":{"login":"ArtSabintsev","id":854860,"avatar_url":"https://avatars.githubusercontent.com/u/854860?v=3","gravatar_id":"","url":"https://api.github.com/users/ArtSabintsev","html_url":"https://github.com/ArtSabintsev","followers_url":"https://api.github.com/users/ArtSabintsev/followers","following_url":"https://api.github.com/users/ArtSabintsev/following{/other_user}","gists_url":"https://api.github.com/users/ArtSabintsev/gists{/gist_id}","starred_url":"https://api.github.com/users/ArtSabintsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArtSabintsev/subscriptions","organizations_url":"https://api.github.com/users/ArtSabintsev/orgs","repos_url":"https://api.github.com/users/ArtSabintsev/repos","events_url":"https://api.github.com/users/ArtSabintsev/events{/privacy}","received_events_url":"https://api.github.com/users/ArtSabintsev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ArtSabintsev/swift-package-manager","description":"The Package Manager for the Swift Programming Language","fork":true,"url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager","forks_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/forks","keys_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/teams","hooks_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/hooks","issue_events_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/issues/events{/number}","events_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/events","assignees_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/assignees{/user}","branches_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/branches{/branch}","tags_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/tags","blobs_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/languages","stargazers_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/stargazers","contributors_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/contributors","subscribers_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/subscribers","subscription_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/subscription","commits_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/contents/{+path}","compare_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/merges","archive_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/downloads","issues_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/issues{/number}","pulls_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/labels{/name}","releases_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/releases{/id}","deployments_url":"https://api.github.com/repos/ArtSabintsev/swift-package-manager/deployments","created_at":"2016-03-03T16:22:35Z","updated_at":"2016-03-03T16:22:36Z","pushed_at":"2016-03-03T16:28:41Z","git_url":"git://github.com/ArtSabintsev/swift-package-manager.git","ssh_url":"git@github.com:ArtSabintsev/swift-package-manager.git","clone_url":"https://github.com/ArtSabintsev/swift-package-manager.git","svn_url":"https://github.com/ArtSabintsev/swift-package-manager","homepage":"","size":780,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apple:master","ref":"master","sha":"987ea09e11ed31e657c877f29a34e6a5c4f31a3e","user":{"login":"apple","id":10639145,"avatar_url":"https://avatars.githubusercontent.com/u/10639145?v=3","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"repo":{"id":44840041,"name":"swift-package-manager","full_name":"apple/swift-package-manager","owner":{"login":"apple","id":10639145,"avatar_url":"https://avatars.githubusercontent.com/u/10639145?v=3","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apple/swift-package-manager","description":"The Package Manager for the Swift Programming Language","fork":false,"url":"https://api.github.com/repos/apple/swift-package-manager","forks_url":"https://api.github.com/repos/apple/swift-package-manager/forks","keys_url":"https://api.github.com/repos/apple/swift-package-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apple/swift-package-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apple/swift-package-manager/teams","hooks_url":"https://api.github.com/repos/apple/swift-package-manager/hooks","issue_events_url":"https://api.github.com/repos/apple/swift-package-manager/issues/events{/number}","events_url":"https://api.github.com/repos/apple/swift-package-manager/events","assignees_url":"https://api.github.com/repos/apple/swift-package-manager/assignees{/user}","branches_url":"https://api.github.com/repos/apple/swift-package-manager/branches{/branch}","tags_url":"https://api.github.com/repos/apple/swift-package-manager/tags","blobs_url":"https://api.github.com/repos/apple/swift-package-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apple/swift-package-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apple/swift-package-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/apple/swift-package-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apple/swift-package-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/apple/swift-package-manager/languages","stargazers_url":"https://api.github.com/repos/apple/swift-package-manager/stargazers","contributors_url":"https://api.github.com/repos/apple/swift-package-manager/contributors","subscribers_url":"https://api.github.com/repos/apple/swift-package-manager/subscribers","subscription_url":"https://api.github.com/repos/apple/swift-package-manager/subscription","commits_url":"https://api.github.com/repos/apple/swift-package-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/apple/swift-package-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/apple/swift-package-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/apple/swift-package-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/apple/swift-package-manager/contents/{+path}","compare_url":"https://api.github.com/repos/apple/swift-package-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apple/swift-package-manager/merges","archive_url":"https://api.github.com/repos/apple/swift-package-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apple/swift-package-manager/downloads","issues_url":"https://api.github.com/repos/apple/swift-package-manager/issues{/number}","pulls_url":"https://api.github.com/repos/apple/swift-package-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/apple/swift-package-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/apple/swift-package-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apple/swift-package-manager/labels{/name}","releases_url":"https://api.github.com/repos/apple/swift-package-manager/releases{/id}","deployments_url":"https://api.github.com/repos/apple/swift-package-manager/deployments","created_at":"2015-10-23T21:41:12Z","updated_at":"2016-03-03T16:20:04Z","pushed_at":"2016-03-03T16:29:02Z","git_url":"git://github.com/apple/swift-package-manager.git","ssh_url":"git@github.com:apple/swift-package-manager.git","clone_url":"https://github.com/apple/swift-package-manager.git","svn_url":"https://github.com/apple/swift-package-manager","homepage":"","size":994,"stargazers_count":3606,"watchers_count":3606,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":280,"mirror_url":null,"open_issues_count":17,"forks":280,"open_issues":17,"watchers":3606,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/170"},"html":{"href":"https://github.com/apple/swift-package-manager/pull/170"},"issue":{"href":"https://api.github.com/repos/apple/swift-package-manager/issues/170"},"comments":{"href":"https://api.github.com/repos/apple/swift-package-manager/issues/170/comments"},"review_comments":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/170/comments"},"review_comment":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/170/commits"},"statuses":{"href":"https://api.github.com/repos/apple/swift-package-manager/statuses/98625072d134937c7db6ae95555d1ae186eb04cd"}}}}