{"action":"created","comment":{"url":"https://api.github.com/repos/swiboe/swiboe/pulls/comments/61776274","id":61776274,"diff_hunk":"@@ -34,8 +35,28 @@ impl RunningRpc {\n     }\n }\n \n-// NOCOM(#sirver): name is no longer fitting\n-struct RpcLoop {\n+struct Recver {\n+    commands: mpsc::Receiver<Command>,\n+}\n+\n+impl Recver {","path":"src/client/rpc_loop.rs","position":21,"original_position":21,"commit_id":"05f8c4066f7f4057cdcc9c9f8a1379446a6212b0","original_commit_id":"05f8c4066f7f4057cdcc9c9f8a1379446a6212b0","user":{"login":"SirVer","id":140115,"avatar_url":"https://avatars.githubusercontent.com/u/140115?v=3","gravatar_id":"","url":"https://api.github.com/users/SirVer","html_url":"https://github.com/SirVer","followers_url":"https://api.github.com/users/SirVer/followers","following_url":"https://api.github.com/users/SirVer/following{/other_user}","gists_url":"https://api.github.com/users/SirVer/gists{/gist_id}","starred_url":"https://api.github.com/users/SirVer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SirVer/subscriptions","organizations_url":"https://api.github.com/users/SirVer/orgs","repos_url":"https://api.github.com/users/SirVer/repos","events_url":"https://api.github.com/users/SirVer/events{/privacy}","received_events_url":"https://api.github.com/users/SirVer/received_events","type":"User","site_admin":false},"body":"Receiver?","created_at":"2016-05-02T18:01:12Z","updated_at":"2016-05-02T18:01:12Z","html_url":"https://github.com/swiboe/swiboe/pull/51#discussion_r61776274","pull_request_url":"https://api.github.com/repos/swiboe/swiboe/pulls/51","_links":{"self":{"href":"https://api.github.com/repos/swiboe/swiboe/pulls/comments/61776274"},"html":{"href":"https://github.com/swiboe/swiboe/pull/51#discussion_r61776274"},"pull_request":{"href":"https://api.github.com/repos/swiboe/swiboe/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/swiboe/swiboe/pulls/51","id":68469138,"html_url":"https://github.com/swiboe/swiboe/pull/51","diff_url":"https://github.com/swiboe/swiboe/pull/51.diff","patch_url":"https://github.com/swiboe/swiboe/pull/51.patch","issue_url":"https://api.github.com/repos/swiboe/swiboe/issues/51","number":51,"state":"open","locked":false,"title":"Refactor","user":{"login":"cwahbong","id":767911,"avatar_url":"https://avatars.githubusercontent.com/u/767911?v=3","gravatar_id":"","url":"https://api.github.com/users/cwahbong","html_url":"https://github.com/cwahbong","followers_url":"https://api.github.com/users/cwahbong/followers","following_url":"https://api.github.com/users/cwahbong/following{/other_user}","gists_url":"https://api.github.com/users/cwahbong/gists{/gist_id}","starred_url":"https://api.github.com/users/cwahbong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwahbong/subscriptions","organizations_url":"https://api.github.com/users/cwahbong/orgs","repos_url":"https://api.github.com/users/cwahbong/repos","events_url":"https://api.github.com/users/cwahbong/events{/privacy}","received_events_url":"https://api.github.com/users/cwahbong/received_events","type":"User","site_admin":false},"body":"I found that both RpcLoop and Swiboe have exactly same spinning loop logic, so here comes a new Spinner class for such abstraction.\r\nAlso try to move Swiboe class out to a new file, and also make a spawn function, which makes server logic simpler.\r\nLast, move classes only used by server side into server module.\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"35\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/swiboe/swiboe/51)\r\n<!-- Reviewable:end -->\r\n","created_at":"2016-04-30T14:23:29Z","updated_at":"2016-05-02T18:01:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a2e2828fb5054d2acaf68aeb4ecb142edbde40de","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/swiboe/swiboe/pulls/51/commits","review_comments_url":"https://api.github.com/repos/swiboe/swiboe/pulls/51/comments","review_comment_url":"https://api.github.com/repos/swiboe/swiboe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/swiboe/swiboe/issues/51/comments","statuses_url":"https://api.github.com/repos/swiboe/swiboe/statuses/05f8c4066f7f4057cdcc9c9f8a1379446a6212b0","head":{"label":"cwahbong:spin-refactor","ref":"spin-refactor","sha":"05f8c4066f7f4057cdcc9c9f8a1379446a6212b0","user":{"login":"cwahbong","id":767911,"avatar_url":"https://avatars.githubusercontent.com/u/767911?v=3","gravatar_id":"","url":"https://api.github.com/users/cwahbong","html_url":"https://github.com/cwahbong","followers_url":"https://api.github.com/users/cwahbong/followers","following_url":"https://api.github.com/users/cwahbong/following{/other_user}","gists_url":"https://api.github.com/users/cwahbong/gists{/gist_id}","starred_url":"https://api.github.com/users/cwahbong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwahbong/subscriptions","organizations_url":"https://api.github.com/users/cwahbong/orgs","repos_url":"https://api.github.com/users/cwahbong/repos","events_url":"https://api.github.com/users/cwahbong/events{/privacy}","received_events_url":"https://api.github.com/users/cwahbong/received_events","type":"User","site_admin":false},"repo":{"id":57047929,"name":"swiboe","full_name":"cwahbong/swiboe","owner":{"login":"cwahbong","id":767911,"avatar_url":"https://avatars.githubusercontent.com/u/767911?v=3","gravatar_id":"","url":"https://api.github.com/users/cwahbong","html_url":"https://github.com/cwahbong","followers_url":"https://api.github.com/users/cwahbong/followers","following_url":"https://api.github.com/users/cwahbong/following{/other_user}","gists_url":"https://api.github.com/users/cwahbong/gists{/gist_id}","starred_url":"https://api.github.com/users/cwahbong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwahbong/subscriptions","organizations_url":"https://api.github.com/users/cwahbong/orgs","repos_url":"https://api.github.com/users/cwahbong/repos","events_url":"https://api.github.com/users/cwahbong/events{/privacy}","received_events_url":"https://api.github.com/users/cwahbong/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cwahbong/swiboe","description":"The text editor for the next 25 years.","fork":true,"url":"https://api.github.com/repos/cwahbong/swiboe","forks_url":"https://api.github.com/repos/cwahbong/swiboe/forks","keys_url":"https://api.github.com/repos/cwahbong/swiboe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cwahbong/swiboe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cwahbong/swiboe/teams","hooks_url":"https://api.github.com/repos/cwahbong/swiboe/hooks","issue_events_url":"https://api.github.com/repos/cwahbong/swiboe/issues/events{/number}","events_url":"https://api.github.com/repos/cwahbong/swiboe/events","assignees_url":"https://api.github.com/repos/cwahbong/swiboe/assignees{/user}","branches_url":"https://api.github.com/repos/cwahbong/swiboe/branches{/branch}","tags_url":"https://api.github.com/repos/cwahbong/swiboe/tags","blobs_url":"https://api.github.com/repos/cwahbong/swiboe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cwahbong/swiboe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cwahbong/swiboe/git/refs{/sha}","trees_url":"https://api.github.com/repos/cwahbong/swiboe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cwahbong/swiboe/statuses/{sha}","languages_url":"https://api.github.com/repos/cwahbong/swiboe/languages","stargazers_url":"https://api.github.com/repos/cwahbong/swiboe/stargazers","contributors_url":"https://api.github.com/repos/cwahbong/swiboe/contributors","subscribers_url":"https://api.github.com/repos/cwahbong/swiboe/subscribers","subscription_url":"https://api.github.com/repos/cwahbong/swiboe/subscription","commits_url":"https://api.github.com/repos/cwahbong/swiboe/commits{/sha}","git_commits_url":"https://api.github.com/repos/cwahbong/swiboe/git/commits{/sha}","comments_url":"https://api.github.com/repos/cwahbong/swiboe/comments{/number}","issue_comment_url":"https://api.github.com/repos/cwahbong/swiboe/issues/comments{/number}","contents_url":"https://api.github.com/repos/cwahbong/swiboe/contents/{+path}","compare_url":"https://api.github.com/repos/cwahbong/swiboe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cwahbong/swiboe/merges","archive_url":"https://api.github.com/repos/cwahbong/swiboe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cwahbong/swiboe/downloads","issues_url":"https://api.github.com/repos/cwahbong/swiboe/issues{/number}","pulls_url":"https://api.github.com/repos/cwahbong/swiboe/pulls{/number}","milestones_url":"https://api.github.com/repos/cwahbong/swiboe/milestones{/number}","notifications_url":"https://api.github.com/repos/cwahbong/swiboe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cwahbong/swiboe/labels{/name}","releases_url":"https://api.github.com/repos/cwahbong/swiboe/releases{/id}","deployments_url":"https://api.github.com/repos/cwahbong/swiboe/deployments","created_at":"2016-04-25T14:21:53Z","updated_at":"2016-04-25T14:21:54Z","pushed_at":"2016-05-02T14:00:31Z","git_url":"git://github.com/cwahbong/swiboe.git","ssh_url":"git@github.com:cwahbong/swiboe.git","clone_url":"https://github.com/cwahbong/swiboe.git","svn_url":"https://github.com/cwahbong/swiboe","homepage":"","size":32548,"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":"swiboe:master","ref":"master","sha":"022cf2b135e70486245fdf4220c6bc1b16cc235e","user":{"login":"swiboe","id":13881676,"avatar_url":"https://avatars.githubusercontent.com/u/13881676?v=3","gravatar_id":"","url":"https://api.github.com/users/swiboe","html_url":"https://github.com/swiboe","followers_url":"https://api.github.com/users/swiboe/followers","following_url":"https://api.github.com/users/swiboe/following{/other_user}","gists_url":"https://api.github.com/users/swiboe/gists{/gist_id}","starred_url":"https://api.github.com/users/swiboe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swiboe/subscriptions","organizations_url":"https://api.github.com/users/swiboe/orgs","repos_url":"https://api.github.com/users/swiboe/repos","events_url":"https://api.github.com/users/swiboe/events{/privacy}","received_events_url":"https://api.github.com/users/swiboe/received_events","type":"Organization","site_admin":false},"repo":{"id":40109271,"name":"swiboe","full_name":"swiboe/swiboe","owner":{"login":"swiboe","id":13881676,"avatar_url":"https://avatars.githubusercontent.com/u/13881676?v=3","gravatar_id":"","url":"https://api.github.com/users/swiboe","html_url":"https://github.com/swiboe","followers_url":"https://api.github.com/users/swiboe/followers","following_url":"https://api.github.com/users/swiboe/following{/other_user}","gists_url":"https://api.github.com/users/swiboe/gists{/gist_id}","starred_url":"https://api.github.com/users/swiboe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swiboe/subscriptions","organizations_url":"https://api.github.com/users/swiboe/orgs","repos_url":"https://api.github.com/users/swiboe/repos","events_url":"https://api.github.com/users/swiboe/events{/privacy}","received_events_url":"https://api.github.com/users/swiboe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/swiboe/swiboe","description":"The text editor for the next 25 years.","fork":false,"url":"https://api.github.com/repos/swiboe/swiboe","forks_url":"https://api.github.com/repos/swiboe/swiboe/forks","keys_url":"https://api.github.com/repos/swiboe/swiboe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swiboe/swiboe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swiboe/swiboe/teams","hooks_url":"https://api.github.com/repos/swiboe/swiboe/hooks","issue_events_url":"https://api.github.com/repos/swiboe/swiboe/issues/events{/number}","events_url":"https://api.github.com/repos/swiboe/swiboe/events","assignees_url":"https://api.github.com/repos/swiboe/swiboe/assignees{/user}","branches_url":"https://api.github.com/repos/swiboe/swiboe/branches{/branch}","tags_url":"https://api.github.com/repos/swiboe/swiboe/tags","blobs_url":"https://api.github.com/repos/swiboe/swiboe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swiboe/swiboe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swiboe/swiboe/git/refs{/sha}","trees_url":"https://api.github.com/repos/swiboe/swiboe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swiboe/swiboe/statuses/{sha}","languages_url":"https://api.github.com/repos/swiboe/swiboe/languages","stargazers_url":"https://api.github.com/repos/swiboe/swiboe/stargazers","contributors_url":"https://api.github.com/repos/swiboe/swiboe/contributors","subscribers_url":"https://api.github.com/repos/swiboe/swiboe/subscribers","subscription_url":"https://api.github.com/repos/swiboe/swiboe/subscription","commits_url":"https://api.github.com/repos/swiboe/swiboe/commits{/sha}","git_commits_url":"https://api.github.com/repos/swiboe/swiboe/git/commits{/sha}","comments_url":"https://api.github.com/repos/swiboe/swiboe/comments{/number}","issue_comment_url":"https://api.github.com/repos/swiboe/swiboe/issues/comments{/number}","contents_url":"https://api.github.com/repos/swiboe/swiboe/contents/{+path}","compare_url":"https://api.github.com/repos/swiboe/swiboe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swiboe/swiboe/merges","archive_url":"https://api.github.com/repos/swiboe/swiboe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swiboe/swiboe/downloads","issues_url":"https://api.github.com/repos/swiboe/swiboe/issues{/number}","pulls_url":"https://api.github.com/repos/swiboe/swiboe/pulls{/number}","milestones_url":"https://api.github.com/repos/swiboe/swiboe/milestones{/number}","notifications_url":"https://api.github.com/repos/swiboe/swiboe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swiboe/swiboe/labels{/name}","releases_url":"https://api.github.com/repos/swiboe/swiboe/releases{/id}","deployments_url":"https://api.github.com/repos/swiboe/swiboe/deployments","created_at":"2015-08-03T06:45:26Z","updated_at":"2016-04-30T01:32:26Z","pushed_at":"2016-05-02T14:02:29Z","git_url":"git://github.com/swiboe/swiboe.git","ssh_url":"git@github.com:swiboe/swiboe.git","clone_url":"https://github.com/swiboe/swiboe.git","svn_url":"https://github.com/swiboe/swiboe","homepage":"","size":32549,"stargazers_count":159,"watchers_count":159,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":9,"forks":13,"open_issues":9,"watchers":159,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/swiboe/swiboe/pulls/51"},"html":{"href":"https://github.com/swiboe/swiboe/pull/51"},"issue":{"href":"https://api.github.com/repos/swiboe/swiboe/issues/51"},"comments":{"href":"https://api.github.com/repos/swiboe/swiboe/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/swiboe/swiboe/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/swiboe/swiboe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/swiboe/swiboe/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/swiboe/swiboe/statuses/05f8c4066f7f4057cdcc9c9f8a1379446a6212b0"}}}}