{"action":"created","comment":{"url":"https://api.github.com/repos/sharkdp/bat/pulls/comments/185570703","pull_request_review_id":116987164,"id":185570703,"diff_hunk":"@@ -379,9 +379,29 @@ fn run() -> Result<()> {\n             })?;\n \n             if let Some(files) = app_matches.values_of(\"FILE\") {\n+                let mut exit = false;\n                 for file in files {\n                     let line_changes = get_git_diff(&file.to_string());\n-                    print_file(&options, theme, &assets.syntax_set, file, &line_changes)?;\n+                    let res = print_file(&options, theme, &assets.syntax_set, file, &line_changes);\n+                    if let Err(error) = res {\n+                        if match error {","path":"src/main.rs","position":10,"original_position":10,"commit_id":"1455d7d3adce872e9b32ef47674660708f1fae7c","original_commit_id":"1455d7d3adce872e9b32ef47674660708f1fae7c","user":{"login":"sharkdp","id":4209276,"avatar_url":"https://avatars2.githubusercontent.com/u/4209276?v=4","gravatar_id":"","url":"https://api.github.com/users/sharkdp","html_url":"https://github.com/sharkdp","followers_url":"https://api.github.com/users/sharkdp/followers","following_url":"https://api.github.com/users/sharkdp/following{/other_user}","gists_url":"https://api.github.com/users/sharkdp/gists{/gist_id}","starred_url":"https://api.github.com/users/sharkdp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharkdp/subscriptions","organizations_url":"https://api.github.com/users/sharkdp/orgs","repos_url":"https://api.github.com/users/sharkdp/repos","events_url":"https://api.github.com/users/sharkdp/events{/privacy}","received_events_url":"https://api.github.com/users/sharkdp/received_events","type":"User","site_admin":false},"body":"This looks correct, but the logic is quite convoluted and a bit hard to understand. The `match` statement looks good but if would be great if we could get rid of the additional `if` and the `exit` variable`.\r\n\r\nI know it's not easy due to borrowing issues (I shortly tried myself yesterday :smile:), but it would be great if we could clean this up a little bit. If you don't want to invest more time, I can also merge this as-is and work on this later.","created_at":"2018-05-02T17:11:17Z","updated_at":"2018-05-02T17:11:17Z","html_url":"https://github.com/sharkdp/bat/pull/38#discussion_r185570703","pull_request_url":"https://api.github.com/repos/sharkdp/bat/pulls/38","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/sharkdp/bat/pulls/comments/185570703"},"html":{"href":"https://github.com/sharkdp/bat/pull/38#discussion_r185570703"},"pull_request":{"href":"https://api.github.com/repos/sharkdp/bat/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/sharkdp/bat/pulls/38","id":185399218,"html_url":"https://github.com/sharkdp/bat/pull/38","diff_url":"https://github.com/sharkdp/bat/pull/38.diff","patch_url":"https://github.com/sharkdp/bat/pull/38.patch","issue_url":"https://api.github.com/repos/sharkdp/bat/issues/38","number":38,"state":"open","locked":false,"title":"continue to output files","user":{"login":"rleungx","id":35896542,"avatar_url":"https://avatars3.githubusercontent.com/u/35896542?v=4","gravatar_id":"","url":"https://api.github.com/users/rleungx","html_url":"https://github.com/rleungx","followers_url":"https://api.github.com/users/rleungx/followers","following_url":"https://api.github.com/users/rleungx/following{/other_user}","gists_url":"https://api.github.com/users/rleungx/gists{/gist_id}","starred_url":"https://api.github.com/users/rleungx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rleungx/subscriptions","organizations_url":"https://api.github.com/users/rleungx/orgs","repos_url":"https://api.github.com/users/rleungx/repos","events_url":"https://api.github.com/users/rleungx/events{/privacy}","received_events_url":"https://api.github.com/users/rleungx/received_events","type":"User","site_admin":false},"body":"Closes #17.","created_at":"2018-05-02T10:39:48Z","updated_at":"2018-05-02T17:11:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c1605b693588fbb92ff3b9de15dd5fd90ae6e192","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sharkdp/bat/pulls/38/commits","review_comments_url":"https://api.github.com/repos/sharkdp/bat/pulls/38/comments","review_comment_url":"https://api.github.com/repos/sharkdp/bat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sharkdp/bat/issues/38/comments","statuses_url":"https://api.github.com/repos/sharkdp/bat/statuses/1455d7d3adce872e9b32ef47674660708f1fae7c","head":{"label":"rleungx:continue-on-errors","ref":"continue-on-errors","sha":"1455d7d3adce872e9b32ef47674660708f1fae7c","user":{"login":"rleungx","id":35896542,"avatar_url":"https://avatars3.githubusercontent.com/u/35896542?v=4","gravatar_id":"","url":"https://api.github.com/users/rleungx","html_url":"https://github.com/rleungx","followers_url":"https://api.github.com/users/rleungx/followers","following_url":"https://api.github.com/users/rleungx/following{/other_user}","gists_url":"https://api.github.com/users/rleungx/gists{/gist_id}","starred_url":"https://api.github.com/users/rleungx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rleungx/subscriptions","organizations_url":"https://api.github.com/users/rleungx/orgs","repos_url":"https://api.github.com/users/rleungx/repos","events_url":"https://api.github.com/users/rleungx/events{/privacy}","received_events_url":"https://api.github.com/users/rleungx/received_events","type":"User","site_admin":false},"repo":{"id":131817982,"name":"bat","full_name":"rleungx/bat","owner":{"login":"rleungx","id":35896542,"avatar_url":"https://avatars3.githubusercontent.com/u/35896542?v=4","gravatar_id":"","url":"https://api.github.com/users/rleungx","html_url":"https://github.com/rleungx","followers_url":"https://api.github.com/users/rleungx/followers","following_url":"https://api.github.com/users/rleungx/following{/other_user}","gists_url":"https://api.github.com/users/rleungx/gists{/gist_id}","starred_url":"https://api.github.com/users/rleungx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rleungx/subscriptions","organizations_url":"https://api.github.com/users/rleungx/orgs","repos_url":"https://api.github.com/users/rleungx/repos","events_url":"https://api.github.com/users/rleungx/events{/privacy}","received_events_url":"https://api.github.com/users/rleungx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rleungx/bat","description":"A cat(1) clone with wings.","fork":true,"url":"https://api.github.com/repos/rleungx/bat","forks_url":"https://api.github.com/repos/rleungx/bat/forks","keys_url":"https://api.github.com/repos/rleungx/bat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rleungx/bat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rleungx/bat/teams","hooks_url":"https://api.github.com/repos/rleungx/bat/hooks","issue_events_url":"https://api.github.com/repos/rleungx/bat/issues/events{/number}","events_url":"https://api.github.com/repos/rleungx/bat/events","assignees_url":"https://api.github.com/repos/rleungx/bat/assignees{/user}","branches_url":"https://api.github.com/repos/rleungx/bat/branches{/branch}","tags_url":"https://api.github.com/repos/rleungx/bat/tags","blobs_url":"https://api.github.com/repos/rleungx/bat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rleungx/bat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rleungx/bat/git/refs{/sha}","trees_url":"https://api.github.com/repos/rleungx/bat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rleungx/bat/statuses/{sha}","languages_url":"https://api.github.com/repos/rleungx/bat/languages","stargazers_url":"https://api.github.com/repos/rleungx/bat/stargazers","contributors_url":"https://api.github.com/repos/rleungx/bat/contributors","subscribers_url":"https://api.github.com/repos/rleungx/bat/subscribers","subscription_url":"https://api.github.com/repos/rleungx/bat/subscription","commits_url":"https://api.github.com/repos/rleungx/bat/commits{/sha}","git_commits_url":"https://api.github.com/repos/rleungx/bat/git/commits{/sha}","comments_url":"https://api.github.com/repos/rleungx/bat/comments{/number}","issue_comment_url":"https://api.github.com/repos/rleungx/bat/issues/comments{/number}","contents_url":"https://api.github.com/repos/rleungx/bat/contents/{+path}","compare_url":"https://api.github.com/repos/rleungx/bat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rleungx/bat/merges","archive_url":"https://api.github.com/repos/rleungx/bat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rleungx/bat/downloads","issues_url":"https://api.github.com/repos/rleungx/bat/issues{/number}","pulls_url":"https://api.github.com/repos/rleungx/bat/pulls{/number}","milestones_url":"https://api.github.com/repos/rleungx/bat/milestones{/number}","notifications_url":"https://api.github.com/repos/rleungx/bat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rleungx/bat/labels{/name}","releases_url":"https://api.github.com/repos/rleungx/bat/releases{/id}","deployments_url":"https://api.github.com/repos/rleungx/bat/deployments","created_at":"2018-05-02T08:01:06Z","updated_at":"2018-05-02T08:01:08Z","pushed_at":"2018-05-02T15:33:16Z","git_url":"git://github.com/rleungx/bat.git","ssh_url":"git@github.com:rleungx/bat.git","clone_url":"https://github.com/rleungx/bat.git","svn_url":"https://github.com/rleungx/bat","homepage":"","size":645,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sharkdp:master","ref":"master","sha":"ed09a80a731bc5b93ea047f9da098355b880e0a3","user":{"login":"sharkdp","id":4209276,"avatar_url":"https://avatars2.githubusercontent.com/u/4209276?v=4","gravatar_id":"","url":"https://api.github.com/users/sharkdp","html_url":"https://github.com/sharkdp","followers_url":"https://api.github.com/users/sharkdp/followers","following_url":"https://api.github.com/users/sharkdp/following{/other_user}","gists_url":"https://api.github.com/users/sharkdp/gists{/gist_id}","starred_url":"https://api.github.com/users/sharkdp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharkdp/subscriptions","organizations_url":"https://api.github.com/users/sharkdp/orgs","repos_url":"https://api.github.com/users/sharkdp/repos","events_url":"https://api.github.com/users/sharkdp/events{/privacy}","received_events_url":"https://api.github.com/users/sharkdp/received_events","type":"User","site_admin":false},"repo":{"id":130464961,"name":"bat","full_name":"sharkdp/bat","owner":{"login":"sharkdp","id":4209276,"avatar_url":"https://avatars2.githubusercontent.com/u/4209276?v=4","gravatar_id":"","url":"https://api.github.com/users/sharkdp","html_url":"https://github.com/sharkdp","followers_url":"https://api.github.com/users/sharkdp/followers","following_url":"https://api.github.com/users/sharkdp/following{/other_user}","gists_url":"https://api.github.com/users/sharkdp/gists{/gist_id}","starred_url":"https://api.github.com/users/sharkdp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharkdp/subscriptions","organizations_url":"https://api.github.com/users/sharkdp/orgs","repos_url":"https://api.github.com/users/sharkdp/repos","events_url":"https://api.github.com/users/sharkdp/events{/privacy}","received_events_url":"https://api.github.com/users/sharkdp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sharkdp/bat","description":"A cat(1) clone with wings.","fork":false,"url":"https://api.github.com/repos/sharkdp/bat","forks_url":"https://api.github.com/repos/sharkdp/bat/forks","keys_url":"https://api.github.com/repos/sharkdp/bat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sharkdp/bat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sharkdp/bat/teams","hooks_url":"https://api.github.com/repos/sharkdp/bat/hooks","issue_events_url":"https://api.github.com/repos/sharkdp/bat/issues/events{/number}","events_url":"https://api.github.com/repos/sharkdp/bat/events","assignees_url":"https://api.github.com/repos/sharkdp/bat/assignees{/user}","branches_url":"https://api.github.com/repos/sharkdp/bat/branches{/branch}","tags_url":"https://api.github.com/repos/sharkdp/bat/tags","blobs_url":"https://api.github.com/repos/sharkdp/bat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sharkdp/bat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sharkdp/bat/git/refs{/sha}","trees_url":"https://api.github.com/repos/sharkdp/bat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sharkdp/bat/statuses/{sha}","languages_url":"https://api.github.com/repos/sharkdp/bat/languages","stargazers_url":"https://api.github.com/repos/sharkdp/bat/stargazers","contributors_url":"https://api.github.com/repos/sharkdp/bat/contributors","subscribers_url":"https://api.github.com/repos/sharkdp/bat/subscribers","subscription_url":"https://api.github.com/repos/sharkdp/bat/subscription","commits_url":"https://api.github.com/repos/sharkdp/bat/commits{/sha}","git_commits_url":"https://api.github.com/repos/sharkdp/bat/git/commits{/sha}","comments_url":"https://api.github.com/repos/sharkdp/bat/comments{/number}","issue_comment_url":"https://api.github.com/repos/sharkdp/bat/issues/comments{/number}","contents_url":"https://api.github.com/repos/sharkdp/bat/contents/{+path}","compare_url":"https://api.github.com/repos/sharkdp/bat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sharkdp/bat/merges","archive_url":"https://api.github.com/repos/sharkdp/bat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sharkdp/bat/downloads","issues_url":"https://api.github.com/repos/sharkdp/bat/issues{/number}","pulls_url":"https://api.github.com/repos/sharkdp/bat/pulls{/number}","milestones_url":"https://api.github.com/repos/sharkdp/bat/milestones{/number}","notifications_url":"https://api.github.com/repos/sharkdp/bat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sharkdp/bat/labels{/name}","releases_url":"https://api.github.com/repos/sharkdp/bat/releases{/id}","deployments_url":"https://api.github.com/repos/sharkdp/bat/deployments","created_at":"2018-04-21T10:52:23Z","updated_at":"2018-05-02T17:07:08Z","pushed_at":"2018-05-02T15:33:17Z","git_url":"git://github.com/sharkdp/bat.git","ssh_url":"git@github.com:sharkdp/bat.git","clone_url":"https://github.com/sharkdp/bat.git","svn_url":"https://github.com/sharkdp/bat","homepage":"","size":644,"stargazers_count":645,"watchers_count":645,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":6,"open_issues":20,"watchers":645,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sharkdp/bat/pulls/38"},"html":{"href":"https://github.com/sharkdp/bat/pull/38"},"issue":{"href":"https://api.github.com/repos/sharkdp/bat/issues/38"},"comments":{"href":"https://api.github.com/repos/sharkdp/bat/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/sharkdp/bat/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/sharkdp/bat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sharkdp/bat/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/sharkdp/bat/statuses/1455d7d3adce872e9b32ef47674660708f1fae7c"}},"author_association":"NONE"}}
{"actor":{"display_login":"sharkdp"}}