{"action":"created","comment":{"url":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/comments/91056079","pull_request_review_id":11565912,"id":91056079,"diff_hunk":"@@ -96,23 +96,28 @@ fn parse_poi(osmobj: &osmpbfreader::OsmObj,\n         }\n     };\n \n-    let name = osmobj.tags().get(\"name\").map_or(osmobj.tags().get(\"amenity\").unwrap(), |name| name );\n+    let name = osmobj.tags().get(\"name\").map_or(osmobj.tags().get(\"amenity\"), |name| Some(name) );\n \n     if coord.is_default() {\n         info!(\"The poi {} is rejected, cause: could not compute coordinates.\",\n               id);\n         return None;\n     }\n \n+    if name.is_none() {\n+        info!(\"The poi {} is rejected, cause: could not compute name.\", id);\n+        return None;\n+    }","path":"src/osm_reader/poi.rs","position":null,"original_position":16,"commit_id":"28c44c0b2ba9b649e60c779774c231591784b61c","original_commit_id":"28c44c0b2ba9b649e60c779774c231591784b61c","user":{"login":"TeXitoi","id":5787066,"avatar_url":"https://avatars.githubusercontent.com/u/5787066?v=3","gravatar_id":"","url":"https://api.github.com/users/TeXitoi","html_url":"https://github.com/TeXitoi","followers_url":"https://api.github.com/users/TeXitoi/followers","following_url":"https://api.github.com/users/TeXitoi/following{/other_user}","gists_url":"https://api.github.com/users/TeXitoi/gists{/gist_id}","starred_url":"https://api.github.com/users/TeXitoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeXitoi/subscriptions","organizations_url":"https://api.github.com/users/TeXitoi/orgs","repos_url":"https://api.github.com/users/TeXitoi/repos","events_url":"https://api.github.com/users/TeXitoi/events{/privacy}","received_events_url":"https://api.github.com/users/TeXitoi/received_events","type":"User","site_admin":false},"body":"```rust\r\nlet name = if let Some(s) = name {\r\n    s\r\n} else {\r\n    info!(\"The poi {} is rejected, cause: could not compute name.\", id);\r\n    return None;\r\n};\r\n```\r\nand remove the `unwrap()` after.","created_at":"2016-12-06T11:06:56Z","updated_at":"2016-12-06T11:07:25Z","html_url":"https://github.com/CanalTP/mimirsbrunn/pull/107#discussion_r91056079","pull_request_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/107","_links":{"self":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/comments/91056079"},"html":{"href":"https://github.com/CanalTP/mimirsbrunn/pull/107#discussion_r91056079"},"pull_request":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/107"}}},"pull_request":{"url":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/107","id":96696189,"html_url":"https://github.com/CanalTP/mimirsbrunn/pull/107","diff_url":"https://github.com/CanalTP/mimirsbrunn/pull/107.diff","patch_url":"https://github.com/CanalTP/mimirsbrunn/pull/107.patch","issue_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/issues/107","number":107,"state":"open","locked":false,"title":"mimirsbrunn: set empty poi name with type","user":{"login":"patochectp","id":5518992,"avatar_url":"https://avatars.githubusercontent.com/u/5518992?v=3","gravatar_id":"","url":"https://api.github.com/users/patochectp","html_url":"https://github.com/patochectp","followers_url":"https://api.github.com/users/patochectp/followers","following_url":"https://api.github.com/users/patochectp/following{/other_user}","gists_url":"https://api.github.com/users/patochectp/gists{/gist_id}","starred_url":"https://api.github.com/users/patochectp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patochectp/subscriptions","organizations_url":"https://api.github.com/users/patochectp/orgs","repos_url":"https://api.github.com/users/patochectp/repos","events_url":"https://api.github.com/users/patochectp/events{/privacy}","received_events_url":"https://api.github.com/users/patochectp/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-06T10:20:50Z","updated_at":"2016-12-06T11:07:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"09bf1ef4b667315c2501ec271b8629dcac7c531f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/107/commits","review_comments_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/107/comments","review_comment_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/issues/107/comments","statuses_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/statuses/28c44c0b2ba9b649e60c779774c231591784b61c","head":{"label":"patochectp:set_poi_name_with_poi_type","ref":"set_poi_name_with_poi_type","sha":"28c44c0b2ba9b649e60c779774c231591784b61c","user":{"login":"patochectp","id":5518992,"avatar_url":"https://avatars.githubusercontent.com/u/5518992?v=3","gravatar_id":"","url":"https://api.github.com/users/patochectp","html_url":"https://github.com/patochectp","followers_url":"https://api.github.com/users/patochectp/followers","following_url":"https://api.github.com/users/patochectp/following{/other_user}","gists_url":"https://api.github.com/users/patochectp/gists{/gist_id}","starred_url":"https://api.github.com/users/patochectp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patochectp/subscriptions","organizations_url":"https://api.github.com/users/patochectp/orgs","repos_url":"https://api.github.com/users/patochectp/repos","events_url":"https://api.github.com/users/patochectp/events{/privacy}","received_events_url":"https://api.github.com/users/patochectp/received_events","type":"User","site_admin":false},"repo":{"id":70592622,"name":"mimirsbrunn","full_name":"patochectp/mimirsbrunn","owner":{"login":"patochectp","id":5518992,"avatar_url":"https://avatars.githubusercontent.com/u/5518992?v=3","gravatar_id":"","url":"https://api.github.com/users/patochectp","html_url":"https://github.com/patochectp","followers_url":"https://api.github.com/users/patochectp/followers","following_url":"https://api.github.com/users/patochectp/following{/other_user}","gists_url":"https://api.github.com/users/patochectp/gists{/gist_id}","starred_url":"https://api.github.com/users/patochectp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patochectp/subscriptions","organizations_url":"https://api.github.com/users/patochectp/orgs","repos_url":"https://api.github.com/users/patochectp/repos","events_url":"https://api.github.com/users/patochectp/events{/privacy}","received_events_url":"https://api.github.com/users/patochectp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/patochectp/mimirsbrunn","description":"mimir data import","fork":true,"url":"https://api.github.com/repos/patochectp/mimirsbrunn","forks_url":"https://api.github.com/repos/patochectp/mimirsbrunn/forks","keys_url":"https://api.github.com/repos/patochectp/mimirsbrunn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/patochectp/mimirsbrunn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/patochectp/mimirsbrunn/teams","hooks_url":"https://api.github.com/repos/patochectp/mimirsbrunn/hooks","issue_events_url":"https://api.github.com/repos/patochectp/mimirsbrunn/issues/events{/number}","events_url":"https://api.github.com/repos/patochectp/mimirsbrunn/events","assignees_url":"https://api.github.com/repos/patochectp/mimirsbrunn/assignees{/user}","branches_url":"https://api.github.com/repos/patochectp/mimirsbrunn/branches{/branch}","tags_url":"https://api.github.com/repos/patochectp/mimirsbrunn/tags","blobs_url":"https://api.github.com/repos/patochectp/mimirsbrunn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/patochectp/mimirsbrunn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/patochectp/mimirsbrunn/git/refs{/sha}","trees_url":"https://api.github.com/repos/patochectp/mimirsbrunn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/patochectp/mimirsbrunn/statuses/{sha}","languages_url":"https://api.github.com/repos/patochectp/mimirsbrunn/languages","stargazers_url":"https://api.github.com/repos/patochectp/mimirsbrunn/stargazers","contributors_url":"https://api.github.com/repos/patochectp/mimirsbrunn/contributors","subscribers_url":"https://api.github.com/repos/patochectp/mimirsbrunn/subscribers","subscription_url":"https://api.github.com/repos/patochectp/mimirsbrunn/subscription","commits_url":"https://api.github.com/repos/patochectp/mimirsbrunn/commits{/sha}","git_commits_url":"https://api.github.com/repos/patochectp/mimirsbrunn/git/commits{/sha}","comments_url":"https://api.github.com/repos/patochectp/mimirsbrunn/comments{/number}","issue_comment_url":"https://api.github.com/repos/patochectp/mimirsbrunn/issues/comments{/number}","contents_url":"https://api.github.com/repos/patochectp/mimirsbrunn/contents/{+path}","compare_url":"https://api.github.com/repos/patochectp/mimirsbrunn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/patochectp/mimirsbrunn/merges","archive_url":"https://api.github.com/repos/patochectp/mimirsbrunn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/patochectp/mimirsbrunn/downloads","issues_url":"https://api.github.com/repos/patochectp/mimirsbrunn/issues{/number}","pulls_url":"https://api.github.com/repos/patochectp/mimirsbrunn/pulls{/number}","milestones_url":"https://api.github.com/repos/patochectp/mimirsbrunn/milestones{/number}","notifications_url":"https://api.github.com/repos/patochectp/mimirsbrunn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/patochectp/mimirsbrunn/labels{/name}","releases_url":"https://api.github.com/repos/patochectp/mimirsbrunn/releases{/id}","deployments_url":"https://api.github.com/repos/patochectp/mimirsbrunn/deployments","created_at":"2016-10-11T12:49:19Z","updated_at":"2016-10-11T12:49:20Z","pushed_at":"2016-12-06T10:43:51Z","git_url":"git://github.com/patochectp/mimirsbrunn.git","ssh_url":"git@github.com:patochectp/mimirsbrunn.git","clone_url":"https://github.com/patochectp/mimirsbrunn.git","svn_url":"https://github.com/patochectp/mimirsbrunn","homepage":null,"size":437,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"CanalTP:master","ref":"master","sha":"5d7dc4ca8c80335f2195575bbd00cb970bcfb9b6","user":{"login":"CanalTP","id":2743985,"avatar_url":"https://avatars.githubusercontent.com/u/2743985?v=3","gravatar_id":"","url":"https://api.github.com/users/CanalTP","html_url":"https://github.com/CanalTP","followers_url":"https://api.github.com/users/CanalTP/followers","following_url":"https://api.github.com/users/CanalTP/following{/other_user}","gists_url":"https://api.github.com/users/CanalTP/gists{/gist_id}","starred_url":"https://api.github.com/users/CanalTP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CanalTP/subscriptions","organizations_url":"https://api.github.com/users/CanalTP/orgs","repos_url":"https://api.github.com/users/CanalTP/repos","events_url":"https://api.github.com/users/CanalTP/events{/privacy}","received_events_url":"https://api.github.com/users/CanalTP/received_events","type":"Organization","site_admin":false},"repo":{"id":55155075,"name":"mimirsbrunn","full_name":"CanalTP/mimirsbrunn","owner":{"login":"CanalTP","id":2743985,"avatar_url":"https://avatars.githubusercontent.com/u/2743985?v=3","gravatar_id":"","url":"https://api.github.com/users/CanalTP","html_url":"https://github.com/CanalTP","followers_url":"https://api.github.com/users/CanalTP/followers","following_url":"https://api.github.com/users/CanalTP/following{/other_user}","gists_url":"https://api.github.com/users/CanalTP/gists{/gist_id}","starred_url":"https://api.github.com/users/CanalTP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CanalTP/subscriptions","organizations_url":"https://api.github.com/users/CanalTP/orgs","repos_url":"https://api.github.com/users/CanalTP/repos","events_url":"https://api.github.com/users/CanalTP/events{/privacy}","received_events_url":"https://api.github.com/users/CanalTP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CanalTP/mimirsbrunn","description":"mimir data import","fork":false,"url":"https://api.github.com/repos/CanalTP/mimirsbrunn","forks_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/forks","keys_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/teams","hooks_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/hooks","issue_events_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/issues/events{/number}","events_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/events","assignees_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/assignees{/user}","branches_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/branches{/branch}","tags_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/tags","blobs_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/git/refs{/sha}","trees_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/statuses/{sha}","languages_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/languages","stargazers_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/stargazers","contributors_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/contributors","subscribers_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/subscribers","subscription_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/subscription","commits_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/commits{/sha}","git_commits_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/git/commits{/sha}","comments_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/comments{/number}","issue_comment_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/issues/comments{/number}","contents_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/contents/{+path}","compare_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/merges","archive_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/downloads","issues_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/issues{/number}","pulls_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls{/number}","milestones_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/milestones{/number}","notifications_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/labels{/name}","releases_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/releases{/id}","deployments_url":"https://api.github.com/repos/CanalTP/mimirsbrunn/deployments","created_at":"2016-03-31T14:02:09Z","updated_at":"2016-11-12T22:38:35Z","pushed_at":"2016-12-06T10:43:51Z","git_url":"git://github.com/CanalTP/mimirsbrunn.git","ssh_url":"git@github.com:CanalTP/mimirsbrunn.git","clone_url":"https://github.com/CanalTP/mimirsbrunn.git","svn_url":"https://github.com/CanalTP/mimirsbrunn","homepage":null,"size":660,"stargazers_count":6,"watchers_count":6,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":2,"forks":12,"open_issues":2,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/107"},"html":{"href":"https://github.com/CanalTP/mimirsbrunn/pull/107"},"issue":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/issues/107"},"comments":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/issues/107/comments"},"review_comments":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/107/comments"},"review_comment":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/pulls/107/commits"},"statuses":{"href":"https://api.github.com/repos/CanalTP/mimirsbrunn/statuses/28c44c0b2ba9b649e60c779774c231591784b61c"}}}}
{"actor":{"display_login":"TeXitoi"}}