{"action":"created","comment":{"url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/pulls/comments/53152413","id":53152413,"diff_hunk":"@@ -232,9 +288,57 @@ impl Decodable for Chat {\n \n impl Encodable for Chat {\n     fn encode<E: Encoder>(&self, e: &mut E) -> Result<(), E::Error> {\n+\n         match self {\n-            &Chat::User(ref u) => u.encode(e),\n-            &Chat::Group(ref g) => g.encode(e),\n+            &Chat::Private { ref id, ref first_name, ref last_name, ref username } => {\n+                e.emit_struct(\"Chat\", 5, |e| {\n+                    try!(e.emit_struct_field(\"id\", 0, |e| {\n+                        id.encode(e)\n+                    }));\n+                    try!(e.emit_struct_field(\"type\", 1, |e| {\n+                        \"private\".encode(e)\n+                    }));\n+                    try!(e.emit_struct_field(\"first_name\", 2, |e| {\n+                        first_name.encode(e)\n+                    }));\n+                    try!(e.emit_struct_field(\"last_name\", 3, |e| {\n+                        last_name.encode(e)\n+                    }));\n+                    try!(e.emit_struct_field(\"type\", 4, |e| {\n+                        username.encode(e)\n+                    }));\n+                    Ok(())\n+                })\n+            },\n+            &Chat::Group { ref id, ref title, ref is_supergroup} => {","path":"src/types/mod.rs","position":179,"original_position":179,"commit_id":"e5bbcaa4be7fff9c3d5ab8af8630fed66cb17239","original_commit_id":"e5bbcaa4be7fff9c3d5ab8af8630fed66cb17239","user":{"login":"LukasKalbertodt","id":7419664,"avatar_url":"https://avatars.githubusercontent.com/u/7419664?v=3","gravatar_id":"","url":"https://api.github.com/users/LukasKalbertodt","html_url":"https://github.com/LukasKalbertodt","followers_url":"https://api.github.com/users/LukasKalbertodt/followers","following_url":"https://api.github.com/users/LukasKalbertodt/following{/other_user}","gists_url":"https://api.github.com/users/LukasKalbertodt/gists{/gist_id}","starred_url":"https://api.github.com/users/LukasKalbertodt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukasKalbertodt/subscriptions","organizations_url":"https://api.github.com/users/LukasKalbertodt/orgs","repos_url":"https://api.github.com/users/LukasKalbertodt/repos","events_url":"https://api.github.com/users/LukasKalbertodt/events{/privacy}","received_events_url":"https://api.github.com/users/LukasKalbertodt/received_events","type":"User","site_admin":false},"body":"You could drop the `ref` on `is_supergroup` and `id`, since those are copy types. Also applicable to `id` in the other two match arms. Then you have to remove the `*` in front of those variables of course. Maybe a bit more readable...","created_at":"2016-02-17T11:38:47Z","updated_at":"2016-02-17T11:38:47Z","html_url":"https://github.com/LukasKalbertodt/telegram-bot/pull/29#discussion_r53152413","pull_request_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/pulls/comments/53152413"},"html":{"href":"https://github.com/LukasKalbertodt/telegram-bot/pull/29#discussion_r53152413"},"pull_request":{"href":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/pulls/29","id":59593271,"html_url":"https://github.com/LukasKalbertodt/telegram-bot/pull/29","diff_url":"https://github.com/LukasKalbertodt/telegram-bot/pull/29.diff","patch_url":"https://github.com/LukasKalbertodt/telegram-bot/pull/29.patch","issue_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/issues/29","number":29,"state":"open","locked":false,"title":"Api update","user":{"login":"knsd","id":613511,"avatar_url":"https://avatars.githubusercontent.com/u/613511?v=3","gravatar_id":"","url":"https://api.github.com/users/knsd","html_url":"https://github.com/knsd","followers_url":"https://api.github.com/users/knsd/followers","following_url":"https://api.github.com/users/knsd/following{/other_user}","gists_url":"https://api.github.com/users/knsd/gists{/gist_id}","starred_url":"https://api.github.com/users/knsd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knsd/subscriptions","organizations_url":"https://api.github.com/users/knsd/orgs","repos_url":"https://api.github.com/users/knsd/repos","events_url":"https://api.github.com/users/knsd/events{/privacy}","received_events_url":"https://api.github.com/users/knsd/received_events","type":"User","site_admin":false},"body":"Merges:\r\n  - #21 — update Type for Contact;\r\n  - #24 — fix handling of replies to a message, but joins `forward_from` and `forward_date` into a single field `forward`.\r\n\r\nFixes:\r\n  - #19 — update API, mostly, without File and getFile and and inline bots support.;\r\n  - #23 — add supergroup support;\r\n  - #25 — add parse_mode to sendMessage method;\r\n  - #27 — update chat type;\r\n  - fix some compiler warnings.\r\n","created_at":"2016-02-17T03:56:59Z","updated_at":"2016-02-17T11:38:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed0410829c4671fe1485f3c5302c2b1b2ecc346c","assignee":{"login":"knsd","id":613511,"avatar_url":"https://avatars.githubusercontent.com/u/613511?v=3","gravatar_id":"","url":"https://api.github.com/users/knsd","html_url":"https://github.com/knsd","followers_url":"https://api.github.com/users/knsd/followers","following_url":"https://api.github.com/users/knsd/following{/other_user}","gists_url":"https://api.github.com/users/knsd/gists{/gist_id}","starred_url":"https://api.github.com/users/knsd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knsd/subscriptions","organizations_url":"https://api.github.com/users/knsd/orgs","repos_url":"https://api.github.com/users/knsd/repos","events_url":"https://api.github.com/users/knsd/events{/privacy}","received_events_url":"https://api.github.com/users/knsd/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/milestones/1","html_url":"https://github.com/LukasKalbertodt/telegram-bot/milestones/0.4.0","labels_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/milestones/1/labels","id":1554593,"number":1,"title":"0.4.0","description":"","creator":{"login":"knsd","id":613511,"avatar_url":"https://avatars.githubusercontent.com/u/613511?v=3","gravatar_id":"","url":"https://api.github.com/users/knsd","html_url":"https://github.com/knsd","followers_url":"https://api.github.com/users/knsd/followers","following_url":"https://api.github.com/users/knsd/following{/other_user}","gists_url":"https://api.github.com/users/knsd/gists{/gist_id}","starred_url":"https://api.github.com/users/knsd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knsd/subscriptions","organizations_url":"https://api.github.com/users/knsd/orgs","repos_url":"https://api.github.com/users/knsd/repos","events_url":"https://api.github.com/users/knsd/events{/privacy}","received_events_url":"https://api.github.com/users/knsd/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":0,"state":"open","created_at":"2016-02-01T03:53:29Z","updated_at":"2016-02-17T03:56:59Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/pulls/29/commits","review_comments_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/pulls/29/comments","review_comment_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/issues/29/comments","statuses_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/statuses/e5bbcaa4be7fff9c3d5ab8af8630fed66cb17239","head":{"label":"LukasKalbertodt:api-update","ref":"api-update","sha":"e5bbcaa4be7fff9c3d5ab8af8630fed66cb17239","user":{"login":"LukasKalbertodt","id":7419664,"avatar_url":"https://avatars.githubusercontent.com/u/7419664?v=3","gravatar_id":"","url":"https://api.github.com/users/LukasKalbertodt","html_url":"https://github.com/LukasKalbertodt","followers_url":"https://api.github.com/users/LukasKalbertodt/followers","following_url":"https://api.github.com/users/LukasKalbertodt/following{/other_user}","gists_url":"https://api.github.com/users/LukasKalbertodt/gists{/gist_id}","starred_url":"https://api.github.com/users/LukasKalbertodt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukasKalbertodt/subscriptions","organizations_url":"https://api.github.com/users/LukasKalbertodt/orgs","repos_url":"https://api.github.com/users/LukasKalbertodt/repos","events_url":"https://api.github.com/users/LukasKalbertodt/events{/privacy}","received_events_url":"https://api.github.com/users/LukasKalbertodt/received_events","type":"User","site_admin":false},"repo":{"id":38103923,"name":"telegram-bot","full_name":"LukasKalbertodt/telegram-bot","owner":{"login":"LukasKalbertodt","id":7419664,"avatar_url":"https://avatars.githubusercontent.com/u/7419664?v=3","gravatar_id":"","url":"https://api.github.com/users/LukasKalbertodt","html_url":"https://github.com/LukasKalbertodt","followers_url":"https://api.github.com/users/LukasKalbertodt/followers","following_url":"https://api.github.com/users/LukasKalbertodt/following{/other_user}","gists_url":"https://api.github.com/users/LukasKalbertodt/gists{/gist_id}","starred_url":"https://api.github.com/users/LukasKalbertodt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukasKalbertodt/subscriptions","organizations_url":"https://api.github.com/users/LukasKalbertodt/orgs","repos_url":"https://api.github.com/users/LukasKalbertodt/repos","events_url":"https://api.github.com/users/LukasKalbertodt/events{/privacy}","received_events_url":"https://api.github.com/users/LukasKalbertodt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LukasKalbertodt/telegram-bot","description":"Rust Library for creating a Telegram Bot","fork":false,"url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot","forks_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/forks","keys_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/teams","hooks_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/hooks","issue_events_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/issues/events{/number}","events_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/events","assignees_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/assignees{/user}","branches_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/branches{/branch}","tags_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/tags","blobs_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/statuses/{sha}","languages_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/languages","stargazers_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/stargazers","contributors_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/contributors","subscribers_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/subscribers","subscription_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/subscription","commits_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/contents/{+path}","compare_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/merges","archive_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/downloads","issues_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/issues{/number}","pulls_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/pulls{/number}","milestones_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/milestones{/number}","notifications_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/labels{/name}","releases_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/releases{/id}","deployments_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/deployments","created_at":"2015-06-26T09:55:12Z","updated_at":"2016-02-16T12:49:34Z","pushed_at":"2016-02-17T03:57:00Z","git_url":"git://github.com/LukasKalbertodt/telegram-bot.git","ssh_url":"git@github.com:LukasKalbertodt/telegram-bot.git","clone_url":"https://github.com/LukasKalbertodt/telegram-bot.git","svn_url":"https://github.com/LukasKalbertodt/telegram-bot","homepage":null,"size":6392,"stargazers_count":18,"watchers_count":18,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":12,"forks":7,"open_issues":12,"watchers":18,"default_branch":"master"}},"base":{"label":"LukasKalbertodt:master","ref":"master","sha":"dd2c099aba0de7fc8dcb481e47514e3877cc145e","user":{"login":"LukasKalbertodt","id":7419664,"avatar_url":"https://avatars.githubusercontent.com/u/7419664?v=3","gravatar_id":"","url":"https://api.github.com/users/LukasKalbertodt","html_url":"https://github.com/LukasKalbertodt","followers_url":"https://api.github.com/users/LukasKalbertodt/followers","following_url":"https://api.github.com/users/LukasKalbertodt/following{/other_user}","gists_url":"https://api.github.com/users/LukasKalbertodt/gists{/gist_id}","starred_url":"https://api.github.com/users/LukasKalbertodt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukasKalbertodt/subscriptions","organizations_url":"https://api.github.com/users/LukasKalbertodt/orgs","repos_url":"https://api.github.com/users/LukasKalbertodt/repos","events_url":"https://api.github.com/users/LukasKalbertodt/events{/privacy}","received_events_url":"https://api.github.com/users/LukasKalbertodt/received_events","type":"User","site_admin":false},"repo":{"id":38103923,"name":"telegram-bot","full_name":"LukasKalbertodt/telegram-bot","owner":{"login":"LukasKalbertodt","id":7419664,"avatar_url":"https://avatars.githubusercontent.com/u/7419664?v=3","gravatar_id":"","url":"https://api.github.com/users/LukasKalbertodt","html_url":"https://github.com/LukasKalbertodt","followers_url":"https://api.github.com/users/LukasKalbertodt/followers","following_url":"https://api.github.com/users/LukasKalbertodt/following{/other_user}","gists_url":"https://api.github.com/users/LukasKalbertodt/gists{/gist_id}","starred_url":"https://api.github.com/users/LukasKalbertodt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukasKalbertodt/subscriptions","organizations_url":"https://api.github.com/users/LukasKalbertodt/orgs","repos_url":"https://api.github.com/users/LukasKalbertodt/repos","events_url":"https://api.github.com/users/LukasKalbertodt/events{/privacy}","received_events_url":"https://api.github.com/users/LukasKalbertodt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LukasKalbertodt/telegram-bot","description":"Rust Library for creating a Telegram Bot","fork":false,"url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot","forks_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/forks","keys_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/teams","hooks_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/hooks","issue_events_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/issues/events{/number}","events_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/events","assignees_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/assignees{/user}","branches_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/branches{/branch}","tags_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/tags","blobs_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/statuses/{sha}","languages_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/languages","stargazers_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/stargazers","contributors_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/contributors","subscribers_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/subscribers","subscription_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/subscription","commits_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/contents/{+path}","compare_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/merges","archive_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/downloads","issues_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/issues{/number}","pulls_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/pulls{/number}","milestones_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/milestones{/number}","notifications_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/labels{/name}","releases_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/releases{/id}","deployments_url":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/deployments","created_at":"2015-06-26T09:55:12Z","updated_at":"2016-02-16T12:49:34Z","pushed_at":"2016-02-17T03:57:00Z","git_url":"git://github.com/LukasKalbertodt/telegram-bot.git","ssh_url":"git@github.com:LukasKalbertodt/telegram-bot.git","clone_url":"https://github.com/LukasKalbertodt/telegram-bot.git","svn_url":"https://github.com/LukasKalbertodt/telegram-bot","homepage":null,"size":6392,"stargazers_count":18,"watchers_count":18,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":12,"forks":7,"open_issues":12,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/pulls/29"},"html":{"href":"https://github.com/LukasKalbertodt/telegram-bot/pull/29"},"issue":{"href":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/issues/29"},"comments":{"href":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/LukasKalbertodt/telegram-bot/statuses/e5bbcaa4be7fff9c3d5ab8af8630fed66cb17239"}}}}