{"action":"created","comment":{"url":"https://api.github.com/repos/heartsucker/rust-tuf/pulls/comments/240883812","pull_request_review_id":184014396,"id":240883812,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MDg4MzgxMg==","diff_hunk":"@@ -268,33 +266,31 @@ where\n         for i in (self.tuf.root().version() + 1)..latest_version {\n             let version = MetadataVersion::Number(i);\n \n-            let signed_root = self.remote.fetch_metadata(\n+            let signed_root = await!(self.remote.fetch_metadata(\n                 &root_path,\n                 &version,\n                 &self.config.max_root_size,\n                 self.config.min_bytes_per_second,\n                 None,\n-            )?;\n+            ))?;\n \n             if !self.tuf.update_root(signed_root.clone())? {\n                 error!(\"{}\", err_msg);\n                 return Err(Error::Programming(err_msg.into()));\n             }\n \n-            self.store_metadata(&root_path, &version, &signed_root);\n+            await!(self.store_metadata(&root_path, &version, &signed_root));\n         }\n \n         if !self.tuf.update_root(latest_root.clone())? {\n             error!(\"{}\", err_msg);\n             return Err(Error::Programming(err_msg.into()));\n         }\n \n-        self.store_metadata(\n-            &root_path,\n-            &MetadataVersion::Number(latest_version),\n-            &latest_root,\n-        );\n-        self.store_metadata(&root_path, &MetadataVersion::None, &latest_root);\n+        let latest_version = MetadataVersion::Number(latest_version);\n+\n+        await!(self.store_metadata(&root_path, &latest_version, &latest_root,));","path":"src/client.rs","position":289,"original_position":289,"commit_id":"a590faecb690736b5c1ae82b1af66e485b8d3887","original_commit_id":"a590faecb690736b5c1ae82b1af66e485b8d3887","user":{"login":"erickt","id":84711,"node_id":"MDQ6VXNlcjg0NzEx","avatar_url":"https://avatars3.githubusercontent.com/u/84711?v=4","gravatar_id":"","url":"https://api.github.com/users/erickt","html_url":"https://github.com/erickt","followers_url":"https://api.github.com/users/erickt/followers","following_url":"https://api.github.com/users/erickt/following{/other_user}","gists_url":"https://api.github.com/users/erickt/gists{/gist_id}","starred_url":"https://api.github.com/users/erickt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erickt/subscriptions","organizations_url":"https://api.github.com/users/erickt/orgs","repos_url":"https://api.github.com/users/erickt/repos","events_url":"https://api.github.com/users/erickt/events{/privacy}","received_events_url":"https://api.github.com/users/erickt/received_events","type":"User","site_admin":false},"body":"These however could be in parallel, though in practice this will just be writing to the local filesystem. Is there much advantage of still making this parallel?","created_at":"2018-12-12T05:08:58Z","updated_at":"2018-12-12T05:08:58Z","html_url":"https://github.com/heartsucker/rust-tuf/pull/166#discussion_r240883812","pull_request_url":"https://api.github.com/repos/heartsucker/rust-tuf/pulls/166","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/heartsucker/rust-tuf/pulls/comments/240883812"},"html":{"href":"https://github.com/heartsucker/rust-tuf/pull/166#discussion_r240883812"},"pull_request":{"href":"https://api.github.com/repos/heartsucker/rust-tuf/pulls/166"}},"in_reply_to_id":240835810},"pull_request":{"url":"https://api.github.com/repos/heartsucker/rust-tuf/pulls/166","id":237833433,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3ODMzNDMz","html_url":"https://github.com/heartsucker/rust-tuf/pull/166","diff_url":"https://github.com/heartsucker/rust-tuf/pull/166.diff","patch_url":"https://github.com/heartsucker/rust-tuf/pull/166.patch","issue_url":"https://api.github.com/repos/heartsucker/rust-tuf/issues/166","number":166,"state":"open","locked":false,"title":"Switch to futures, async/await, and hyper 0.12","user":{"login":"erickt","id":84711,"node_id":"MDQ6VXNlcjg0NzEx","avatar_url":"https://avatars3.githubusercontent.com/u/84711?v=4","gravatar_id":"","url":"https://api.github.com/users/erickt","html_url":"https://github.com/erickt","followers_url":"https://api.github.com/users/erickt/followers","following_url":"https://api.github.com/users/erickt/following{/other_user}","gists_url":"https://api.github.com/users/erickt/gists{/gist_id}","starred_url":"https://api.github.com/users/erickt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erickt/subscriptions","organizations_url":"https://api.github.com/users/erickt/orgs","repos_url":"https://api.github.com/users/erickt/repos","events_url":"https://api.github.com/users/erickt/events{/privacy}","received_events_url":"https://api.github.com/users/erickt/received_events","type":"User","site_admin":false},"body":"This is an experiment on porting rust-tuf over to async/await, which is what we use on Fuchsia. This is in contrast with #151, which uses futures 0.1, which is compatible with stable rust, but dramatically more invasive of a change, which is why I haven't rebased it on top of remotes/origin/develop yet.\r\n    \r\nThe downside of this is that landing this patch would make rust-tuf require nightly until async/await is stablized. Unfortunately there is no clear date on when that is going to occur.","created_at":"2018-12-11T21:29:34Z","updated_at":"2018-12-12T05:08:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc3a989f2a8ba717a485238025952f64d9c02aae","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/heartsucker/rust-tuf/pulls/166/commits","review_comments_url":"https://api.github.com/repos/heartsucker/rust-tuf/pulls/166/comments","review_comment_url":"https://api.github.com/repos/heartsucker/rust-tuf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/heartsucker/rust-tuf/issues/166/comments","statuses_url":"https://api.github.com/repos/heartsucker/rust-tuf/statuses/a590faecb690736b5c1ae82b1af66e485b8d3887","head":{"label":"erickt:async","ref":"async","sha":"a590faecb690736b5c1ae82b1af66e485b8d3887","user":{"login":"erickt","id":84711,"node_id":"MDQ6VXNlcjg0NzEx","avatar_url":"https://avatars3.githubusercontent.com/u/84711?v=4","gravatar_id":"","url":"https://api.github.com/users/erickt","html_url":"https://github.com/erickt","followers_url":"https://api.github.com/users/erickt/followers","following_url":"https://api.github.com/users/erickt/following{/other_user}","gists_url":"https://api.github.com/users/erickt/gists{/gist_id}","starred_url":"https://api.github.com/users/erickt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erickt/subscriptions","organizations_url":"https://api.github.com/users/erickt/orgs","repos_url":"https://api.github.com/users/erickt/repos","events_url":"https://api.github.com/users/erickt/events{/privacy}","received_events_url":"https://api.github.com/users/erickt/received_events","type":"User","site_admin":false},"repo":{"id":138115287,"node_id":"MDEwOlJlcG9zaXRvcnkxMzgxMTUyODc=","name":"rust-tuf","full_name":"erickt/rust-tuf","private":false,"owner":{"login":"erickt","id":84711,"node_id":"MDQ6VXNlcjg0NzEx","avatar_url":"https://avatars3.githubusercontent.com/u/84711?v=4","gravatar_id":"","url":"https://api.github.com/users/erickt","html_url":"https://github.com/erickt","followers_url":"https://api.github.com/users/erickt/followers","following_url":"https://api.github.com/users/erickt/following{/other_user}","gists_url":"https://api.github.com/users/erickt/gists{/gist_id}","starred_url":"https://api.github.com/users/erickt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erickt/subscriptions","organizations_url":"https://api.github.com/users/erickt/orgs","repos_url":"https://api.github.com/users/erickt/repos","events_url":"https://api.github.com/users/erickt/events{/privacy}","received_events_url":"https://api.github.com/users/erickt/received_events","type":"User","site_admin":false},"html_url":"https://github.com/erickt/rust-tuf","description":"Rust implementation of The Update Framework (TUF)","fork":true,"url":"https://api.github.com/repos/erickt/rust-tuf","forks_url":"https://api.github.com/repos/erickt/rust-tuf/forks","keys_url":"https://api.github.com/repos/erickt/rust-tuf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erickt/rust-tuf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erickt/rust-tuf/teams","hooks_url":"https://api.github.com/repos/erickt/rust-tuf/hooks","issue_events_url":"https://api.github.com/repos/erickt/rust-tuf/issues/events{/number}","events_url":"https://api.github.com/repos/erickt/rust-tuf/events","assignees_url":"https://api.github.com/repos/erickt/rust-tuf/assignees{/user}","branches_url":"https://api.github.com/repos/erickt/rust-tuf/branches{/branch}","tags_url":"https://api.github.com/repos/erickt/rust-tuf/tags","blobs_url":"https://api.github.com/repos/erickt/rust-tuf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erickt/rust-tuf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erickt/rust-tuf/git/refs{/sha}","trees_url":"https://api.github.com/repos/erickt/rust-tuf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erickt/rust-tuf/statuses/{sha}","languages_url":"https://api.github.com/repos/erickt/rust-tuf/languages","stargazers_url":"https://api.github.com/repos/erickt/rust-tuf/stargazers","contributors_url":"https://api.github.com/repos/erickt/rust-tuf/contributors","subscribers_url":"https://api.github.com/repos/erickt/rust-tuf/subscribers","subscription_url":"https://api.github.com/repos/erickt/rust-tuf/subscription","commits_url":"https://api.github.com/repos/erickt/rust-tuf/commits{/sha}","git_commits_url":"https://api.github.com/repos/erickt/rust-tuf/git/commits{/sha}","comments_url":"https://api.github.com/repos/erickt/rust-tuf/comments{/number}","issue_comment_url":"https://api.github.com/repos/erickt/rust-tuf/issues/comments{/number}","contents_url":"https://api.github.com/repos/erickt/rust-tuf/contents/{+path}","compare_url":"https://api.github.com/repos/erickt/rust-tuf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erickt/rust-tuf/merges","archive_url":"https://api.github.com/repos/erickt/rust-tuf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erickt/rust-tuf/downloads","issues_url":"https://api.github.com/repos/erickt/rust-tuf/issues{/number}","pulls_url":"https://api.github.com/repos/erickt/rust-tuf/pulls{/number}","milestones_url":"https://api.github.com/repos/erickt/rust-tuf/milestones{/number}","notifications_url":"https://api.github.com/repos/erickt/rust-tuf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erickt/rust-tuf/labels{/name}","releases_url":"https://api.github.com/repos/erickt/rust-tuf/releases{/id}","deployments_url":"https://api.github.com/repos/erickt/rust-tuf/deployments","created_at":"2018-06-21T03:35:01Z","updated_at":"2018-06-21T03:35:03Z","pushed_at":"2018-12-11T23:10:56Z","git_url":"git://github.com/erickt/rust-tuf.git","ssh_url":"git@github.com:erickt/rust-tuf.git","clone_url":"https://github.com/erickt/rust-tuf.git","svn_url":"https://github.com/erickt/rust-tuf","homepage":"https://crates.io/crates/tuf","size":774,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"heartsucker:develop","ref":"develop","sha":"6cb0df574663fbf1d14bbddd8e812bf0083476cf","user":{"login":"heartsucker","id":3998464,"node_id":"MDQ6VXNlcjM5OTg0NjQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3998464?v=4","gravatar_id":"","url":"https://api.github.com/users/heartsucker","html_url":"https://github.com/heartsucker","followers_url":"https://api.github.com/users/heartsucker/followers","following_url":"https://api.github.com/users/heartsucker/following{/other_user}","gists_url":"https://api.github.com/users/heartsucker/gists{/gist_id}","starred_url":"https://api.github.com/users/heartsucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heartsucker/subscriptions","organizations_url":"https://api.github.com/users/heartsucker/orgs","repos_url":"https://api.github.com/users/heartsucker/repos","events_url":"https://api.github.com/users/heartsucker/events{/privacy}","received_events_url":"https://api.github.com/users/heartsucker/received_events","type":"User","site_admin":false},"repo":{"id":87706344,"node_id":"MDEwOlJlcG9zaXRvcnk4NzcwNjM0NA==","name":"rust-tuf","full_name":"heartsucker/rust-tuf","private":false,"owner":{"login":"heartsucker","id":3998464,"node_id":"MDQ6VXNlcjM5OTg0NjQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3998464?v=4","gravatar_id":"","url":"https://api.github.com/users/heartsucker","html_url":"https://github.com/heartsucker","followers_url":"https://api.github.com/users/heartsucker/followers","following_url":"https://api.github.com/users/heartsucker/following{/other_user}","gists_url":"https://api.github.com/users/heartsucker/gists{/gist_id}","starred_url":"https://api.github.com/users/heartsucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heartsucker/subscriptions","organizations_url":"https://api.github.com/users/heartsucker/orgs","repos_url":"https://api.github.com/users/heartsucker/repos","events_url":"https://api.github.com/users/heartsucker/events{/privacy}","received_events_url":"https://api.github.com/users/heartsucker/received_events","type":"User","site_admin":false},"html_url":"https://github.com/heartsucker/rust-tuf","description":"Rust implementation of The Update Framework (TUF)","fork":false,"url":"https://api.github.com/repos/heartsucker/rust-tuf","forks_url":"https://api.github.com/repos/heartsucker/rust-tuf/forks","keys_url":"https://api.github.com/repos/heartsucker/rust-tuf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/heartsucker/rust-tuf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/heartsucker/rust-tuf/teams","hooks_url":"https://api.github.com/repos/heartsucker/rust-tuf/hooks","issue_events_url":"https://api.github.com/repos/heartsucker/rust-tuf/issues/events{/number}","events_url":"https://api.github.com/repos/heartsucker/rust-tuf/events","assignees_url":"https://api.github.com/repos/heartsucker/rust-tuf/assignees{/user}","branches_url":"https://api.github.com/repos/heartsucker/rust-tuf/branches{/branch}","tags_url":"https://api.github.com/repos/heartsucker/rust-tuf/tags","blobs_url":"https://api.github.com/repos/heartsucker/rust-tuf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/heartsucker/rust-tuf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/heartsucker/rust-tuf/git/refs{/sha}","trees_url":"https://api.github.com/repos/heartsucker/rust-tuf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/heartsucker/rust-tuf/statuses/{sha}","languages_url":"https://api.github.com/repos/heartsucker/rust-tuf/languages","stargazers_url":"https://api.github.com/repos/heartsucker/rust-tuf/stargazers","contributors_url":"https://api.github.com/repos/heartsucker/rust-tuf/contributors","subscribers_url":"https://api.github.com/repos/heartsucker/rust-tuf/subscribers","subscription_url":"https://api.github.com/repos/heartsucker/rust-tuf/subscription","commits_url":"https://api.github.com/repos/heartsucker/rust-tuf/commits{/sha}","git_commits_url":"https://api.github.com/repos/heartsucker/rust-tuf/git/commits{/sha}","comments_url":"https://api.github.com/repos/heartsucker/rust-tuf/comments{/number}","issue_comment_url":"https://api.github.com/repos/heartsucker/rust-tuf/issues/comments{/number}","contents_url":"https://api.github.com/repos/heartsucker/rust-tuf/contents/{+path}","compare_url":"https://api.github.com/repos/heartsucker/rust-tuf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/heartsucker/rust-tuf/merges","archive_url":"https://api.github.com/repos/heartsucker/rust-tuf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/heartsucker/rust-tuf/downloads","issues_url":"https://api.github.com/repos/heartsucker/rust-tuf/issues{/number}","pulls_url":"https://api.github.com/repos/heartsucker/rust-tuf/pulls{/number}","milestones_url":"https://api.github.com/repos/heartsucker/rust-tuf/milestones{/number}","notifications_url":"https://api.github.com/repos/heartsucker/rust-tuf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/heartsucker/rust-tuf/labels{/name}","releases_url":"https://api.github.com/repos/heartsucker/rust-tuf/releases{/id}","deployments_url":"https://api.github.com/repos/heartsucker/rust-tuf/deployments","created_at":"2017-04-09T12:20:10Z","updated_at":"2018-12-09T16:02:22Z","pushed_at":"2018-12-11T23:10:57Z","git_url":"git://github.com/heartsucker/rust-tuf.git","ssh_url":"git@github.com:heartsucker/rust-tuf.git","clone_url":"https://github.com/heartsucker/rust-tuf.git","svn_url":"https://github.com/heartsucker/rust-tuf","homepage":"https://crates.io/crates/tuf","size":737,"stargazers_count":72,"watchers_count":72,"language":"Rust","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":46,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":11,"open_issues":46,"watchers":72,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/heartsucker/rust-tuf/pulls/166"},"html":{"href":"https://github.com/heartsucker/rust-tuf/pull/166"},"issue":{"href":"https://api.github.com/repos/heartsucker/rust-tuf/issues/166"},"comments":{"href":"https://api.github.com/repos/heartsucker/rust-tuf/issues/166/comments"},"review_comments":{"href":"https://api.github.com/repos/heartsucker/rust-tuf/pulls/166/comments"},"review_comment":{"href":"https://api.github.com/repos/heartsucker/rust-tuf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/heartsucker/rust-tuf/pulls/166/commits"},"statuses":{"href":"https://api.github.com/repos/heartsucker/rust-tuf/statuses/a590faecb690736b5c1ae82b1af66e485b8d3887"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"erickt"}}