{"action":"created","comment":{"url":"https://api.github.com/repos/ethcore/parity/pulls/comments/70060005","id":70060005,"diff_hunk":"@@ -65,3 +65,28 @@ pub fn version_data() -> Bytes {\n \ts.append(&&Target::os()[0..2]);\n \ts.out()\n }\n+\n+/// Object can be locked directly into a `MutexGuard`.\n+pub trait Lockable<T> {\n+\t/// Lock object directly into a `MutexGuard`.\n+\tfn locked(&self) -> MutexGuard<T>;\n+}\n+\n+impl<T: Sized> Lockable<T> for Mutex<T> {\n+\tfn locked(&self) -> MutexGuard<T> { self.lock().unwrap() }\n+}\n+\n+/// Object can be read or write locked directly into a guard.\n+pub trait RwLockable<T> {\n+\t/// Read-lock object directly into a `ReadGuard`.\n+\tfn unwrapped_read(&self) -> RwLockReadGuard<T>;\n+\n+\t/// Write-lock object directly into a `WriteGuard`.\n+\tfn unwrapped_write(&self) -> RwLockWriteGuard<T>;\n+}\n+\n+impl<T: Sized> RwLockable<T> for RwLock<T> {","path":"util/src/misc.rs","position":24,"original_position":24,"commit_id":"d7077c8ef7688ccc88a8e4bed2e9d960bbf8078a","original_commit_id":"d7077c8ef7688ccc88a8e4bed2e9d960bbf8078a","user":{"login":"rphmeier","id":10121380,"avatar_url":"https://avatars.githubusercontent.com/u/10121380?v=3","gravatar_id":"","url":"https://api.github.com/users/rphmeier","html_url":"https://github.com/rphmeier","followers_url":"https://api.github.com/users/rphmeier/followers","following_url":"https://api.github.com/users/rphmeier/following{/other_user}","gists_url":"https://api.github.com/users/rphmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/rphmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rphmeier/subscriptions","organizations_url":"https://api.github.com/users/rphmeier/orgs","repos_url":"https://api.github.com/users/rphmeier/repos","events_url":"https://api.github.com/users/rphmeier/events{/privacy}","received_events_url":"https://api.github.com/users/rphmeier/received_events","type":"User","site_admin":false},"body":"sized bound is implicit","created_at":"2016-07-08T11:22:10Z","updated_at":"2016-07-08T11:22:10Z","html_url":"https://github.com/ethcore/parity/pull/1558#discussion_r70060005","pull_request_url":"https://api.github.com/repos/ethcore/parity/pulls/1558","_links":{"self":{"href":"https://api.github.com/repos/ethcore/parity/pulls/comments/70060005"},"html":{"href":"https://github.com/ethcore/parity/pull/1558#discussion_r70060005"},"pull_request":{"href":"https://api.github.com/repos/ethcore/parity/pulls/1558"}}},"pull_request":{"url":"https://api.github.com/repos/ethcore/parity/pulls/1558","id":76551313,"html_url":"https://github.com/ethcore/parity/pull/1558","diff_url":"https://github.com/ethcore/parity/pull/1558.diff","patch_url":"https://github.com/ethcore/parity/pull/1558.patch","issue_url":"https://api.github.com/repos/ethcore/parity/issues/1558","number":1558,"state":"open","locked":false,"title":"Kill lock unwraps","user":{"login":"gavofyork","id":138296,"avatar_url":"https://avatars.githubusercontent.com/u/138296?v=3","gravatar_id":"","url":"https://api.github.com/users/gavofyork","html_url":"https://github.com/gavofyork","followers_url":"https://api.github.com/users/gavofyork/followers","following_url":"https://api.github.com/users/gavofyork/following{/other_user}","gists_url":"https://api.github.com/users/gavofyork/gists{/gist_id}","starred_url":"https://api.github.com/users/gavofyork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavofyork/subscriptions","organizations_url":"https://api.github.com/users/gavofyork/orgs","repos_url":"https://api.github.com/users/gavofyork/repos","events_url":"https://api.github.com/users/gavofyork/events{/privacy}","received_events_url":"https://api.github.com/users/gavofyork/received_events","type":"User","site_admin":false},"body":"Replace with alternative combined function.\r\n\r\nThis should make the panicker sweep a bit less tedious.","created_at":"2016-07-07T07:39:10Z","updated_at":"2016-07-08T11:22:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e3937eda2e8ba173fe73344e9167e077502d72fb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ethcore/parity/pulls/1558/commits","review_comments_url":"https://api.github.com/repos/ethcore/parity/pulls/1558/comments","review_comment_url":"https://api.github.com/repos/ethcore/parity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethcore/parity/issues/1558/comments","statuses_url":"https://api.github.com/repos/ethcore/parity/statuses/d7077c8ef7688ccc88a8e4bed2e9d960bbf8078a","head":{"label":"ethcore:kill_unwraps","ref":"kill_unwraps","sha":"d7077c8ef7688ccc88a8e4bed2e9d960bbf8078a","user":{"login":"ethcore","id":14176906,"avatar_url":"https://avatars.githubusercontent.com/u/14176906?v=3","gravatar_id":"","url":"https://api.github.com/users/ethcore","html_url":"https://github.com/ethcore","followers_url":"https://api.github.com/users/ethcore/followers","following_url":"https://api.github.com/users/ethcore/following{/other_user}","gists_url":"https://api.github.com/users/ethcore/gists{/gist_id}","starred_url":"https://api.github.com/users/ethcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethcore/subscriptions","organizations_url":"https://api.github.com/users/ethcore/orgs","repos_url":"https://api.github.com/users/ethcore/repos","events_url":"https://api.github.com/users/ethcore/events{/privacy}","received_events_url":"https://api.github.com/users/ethcore/received_events","type":"Organization","site_admin":false},"repo":{"id":46714939,"name":"parity","full_name":"ethcore/parity","owner":{"login":"ethcore","id":14176906,"avatar_url":"https://avatars.githubusercontent.com/u/14176906?v=3","gravatar_id":"","url":"https://api.github.com/users/ethcore","html_url":"https://github.com/ethcore","followers_url":"https://api.github.com/users/ethcore/followers","following_url":"https://api.github.com/users/ethcore/following{/other_user}","gists_url":"https://api.github.com/users/ethcore/gists{/gist_id}","starred_url":"https://api.github.com/users/ethcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethcore/subscriptions","organizations_url":"https://api.github.com/users/ethcore/orgs","repos_url":"https://api.github.com/users/ethcore/repos","events_url":"https://api.github.com/users/ethcore/events{/privacy}","received_events_url":"https://api.github.com/users/ethcore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethcore/parity","description":"Fast, light, robust Ethereum implementation","fork":false,"url":"https://api.github.com/repos/ethcore/parity","forks_url":"https://api.github.com/repos/ethcore/parity/forks","keys_url":"https://api.github.com/repos/ethcore/parity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethcore/parity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethcore/parity/teams","hooks_url":"https://api.github.com/repos/ethcore/parity/hooks","issue_events_url":"https://api.github.com/repos/ethcore/parity/issues/events{/number}","events_url":"https://api.github.com/repos/ethcore/parity/events","assignees_url":"https://api.github.com/repos/ethcore/parity/assignees{/user}","branches_url":"https://api.github.com/repos/ethcore/parity/branches{/branch}","tags_url":"https://api.github.com/repos/ethcore/parity/tags","blobs_url":"https://api.github.com/repos/ethcore/parity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethcore/parity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethcore/parity/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethcore/parity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethcore/parity/statuses/{sha}","languages_url":"https://api.github.com/repos/ethcore/parity/languages","stargazers_url":"https://api.github.com/repos/ethcore/parity/stargazers","contributors_url":"https://api.github.com/repos/ethcore/parity/contributors","subscribers_url":"https://api.github.com/repos/ethcore/parity/subscribers","subscription_url":"https://api.github.com/repos/ethcore/parity/subscription","commits_url":"https://api.github.com/repos/ethcore/parity/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethcore/parity/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethcore/parity/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethcore/parity/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethcore/parity/contents/{+path}","compare_url":"https://api.github.com/repos/ethcore/parity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethcore/parity/merges","archive_url":"https://api.github.com/repos/ethcore/parity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethcore/parity/downloads","issues_url":"https://api.github.com/repos/ethcore/parity/issues{/number}","pulls_url":"https://api.github.com/repos/ethcore/parity/pulls{/number}","milestones_url":"https://api.github.com/repos/ethcore/parity/milestones{/number}","notifications_url":"https://api.github.com/repos/ethcore/parity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethcore/parity/labels{/name}","releases_url":"https://api.github.com/repos/ethcore/parity/releases{/id}","deployments_url":"https://api.github.com/repos/ethcore/parity/deployments","created_at":"2015-11-23T11:07:32Z","updated_at":"2016-07-07T08:54:52Z","pushed_at":"2016-07-08T11:02:02Z","git_url":"git://github.com/ethcore/parity.git","ssh_url":"git@github.com:ethcore/parity.git","clone_url":"https://github.com/ethcore/parity.git","svn_url":"https://github.com/ethcore/parity","homepage":"","size":17838,"stargazers_count":438,"watchers_count":438,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":65,"mirror_url":null,"open_issues_count":105,"forks":65,"open_issues":105,"watchers":438,"default_branch":"master"}},"base":{"label":"ethcore:master","ref":"master","sha":"8282c7dd50dff7e9c6fd54ad4293643af2cf1e6b","user":{"login":"ethcore","id":14176906,"avatar_url":"https://avatars.githubusercontent.com/u/14176906?v=3","gravatar_id":"","url":"https://api.github.com/users/ethcore","html_url":"https://github.com/ethcore","followers_url":"https://api.github.com/users/ethcore/followers","following_url":"https://api.github.com/users/ethcore/following{/other_user}","gists_url":"https://api.github.com/users/ethcore/gists{/gist_id}","starred_url":"https://api.github.com/users/ethcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethcore/subscriptions","organizations_url":"https://api.github.com/users/ethcore/orgs","repos_url":"https://api.github.com/users/ethcore/repos","events_url":"https://api.github.com/users/ethcore/events{/privacy}","received_events_url":"https://api.github.com/users/ethcore/received_events","type":"Organization","site_admin":false},"repo":{"id":46714939,"name":"parity","full_name":"ethcore/parity","owner":{"login":"ethcore","id":14176906,"avatar_url":"https://avatars.githubusercontent.com/u/14176906?v=3","gravatar_id":"","url":"https://api.github.com/users/ethcore","html_url":"https://github.com/ethcore","followers_url":"https://api.github.com/users/ethcore/followers","following_url":"https://api.github.com/users/ethcore/following{/other_user}","gists_url":"https://api.github.com/users/ethcore/gists{/gist_id}","starred_url":"https://api.github.com/users/ethcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethcore/subscriptions","organizations_url":"https://api.github.com/users/ethcore/orgs","repos_url":"https://api.github.com/users/ethcore/repos","events_url":"https://api.github.com/users/ethcore/events{/privacy}","received_events_url":"https://api.github.com/users/ethcore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethcore/parity","description":"Fast, light, robust Ethereum implementation","fork":false,"url":"https://api.github.com/repos/ethcore/parity","forks_url":"https://api.github.com/repos/ethcore/parity/forks","keys_url":"https://api.github.com/repos/ethcore/parity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethcore/parity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethcore/parity/teams","hooks_url":"https://api.github.com/repos/ethcore/parity/hooks","issue_events_url":"https://api.github.com/repos/ethcore/parity/issues/events{/number}","events_url":"https://api.github.com/repos/ethcore/parity/events","assignees_url":"https://api.github.com/repos/ethcore/parity/assignees{/user}","branches_url":"https://api.github.com/repos/ethcore/parity/branches{/branch}","tags_url":"https://api.github.com/repos/ethcore/parity/tags","blobs_url":"https://api.github.com/repos/ethcore/parity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethcore/parity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethcore/parity/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethcore/parity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethcore/parity/statuses/{sha}","languages_url":"https://api.github.com/repos/ethcore/parity/languages","stargazers_url":"https://api.github.com/repos/ethcore/parity/stargazers","contributors_url":"https://api.github.com/repos/ethcore/parity/contributors","subscribers_url":"https://api.github.com/repos/ethcore/parity/subscribers","subscription_url":"https://api.github.com/repos/ethcore/parity/subscription","commits_url":"https://api.github.com/repos/ethcore/parity/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethcore/parity/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethcore/parity/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethcore/parity/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethcore/parity/contents/{+path}","compare_url":"https://api.github.com/repos/ethcore/parity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethcore/parity/merges","archive_url":"https://api.github.com/repos/ethcore/parity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethcore/parity/downloads","issues_url":"https://api.github.com/repos/ethcore/parity/issues{/number}","pulls_url":"https://api.github.com/repos/ethcore/parity/pulls{/number}","milestones_url":"https://api.github.com/repos/ethcore/parity/milestones{/number}","notifications_url":"https://api.github.com/repos/ethcore/parity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethcore/parity/labels{/name}","releases_url":"https://api.github.com/repos/ethcore/parity/releases{/id}","deployments_url":"https://api.github.com/repos/ethcore/parity/deployments","created_at":"2015-11-23T11:07:32Z","updated_at":"2016-07-07T08:54:52Z","pushed_at":"2016-07-08T11:02:02Z","git_url":"git://github.com/ethcore/parity.git","ssh_url":"git@github.com:ethcore/parity.git","clone_url":"https://github.com/ethcore/parity.git","svn_url":"https://github.com/ethcore/parity","homepage":"","size":17838,"stargazers_count":438,"watchers_count":438,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":65,"mirror_url":null,"open_issues_count":105,"forks":65,"open_issues":105,"watchers":438,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethcore/parity/pulls/1558"},"html":{"href":"https://github.com/ethcore/parity/pull/1558"},"issue":{"href":"https://api.github.com/repos/ethcore/parity/issues/1558"},"comments":{"href":"https://api.github.com/repos/ethcore/parity/issues/1558/comments"},"review_comments":{"href":"https://api.github.com/repos/ethcore/parity/pulls/1558/comments"},"review_comment":{"href":"https://api.github.com/repos/ethcore/parity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethcore/parity/pulls/1558/commits"},"statuses":{"href":"https://api.github.com/repos/ethcore/parity/statuses/d7077c8ef7688ccc88a8e4bed2e9d960bbf8078a"}}}}
{"actor":{"display_login":"rphmeier"}}