{"action":"created","comment":{"url":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/comments/209523312","pull_request_review_id":145551582,"id":209523312,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTUyMzMxMg==","diff_hunk":"@@ -63,21 +63,15 @@ where\n     type SinkError = S::SinkError;\n \n     fn start_send(&mut self, item: Self::SinkItem) -> StartSend<Self::SinkItem, Self::SinkError> {\n-        let capacity = item.len() + self.hmac_key.digest_algorithm().output_len;\n \n-        // Apparently this is the fastest way of doing.\n-        // See https://gist.github.com/kirushik/e0d93759b0cd102f814408595c20a9d0\n-        let mut out_buffer = BytesMut::from(vec![0; capacity]);\n+        let mut data_buf = item;","path":"secio/src/codec/encode.rs","position":36,"original_position":36,"commit_id":"eb2a9d51fc45ce21cb797f91282b611f5009ea3b","original_commit_id":"eb2a9d51fc45ce21cb797f91282b611f5009ea3b","user":{"login":"cheme","id":1726091,"node_id":"MDQ6VXNlcjE3MjYwOTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1726091?v=4","gravatar_id":"","url":"https://api.github.com/users/cheme","html_url":"https://github.com/cheme","followers_url":"https://api.github.com/users/cheme/followers","following_url":"https://api.github.com/users/cheme/following{/other_user}","gists_url":"https://api.github.com/users/cheme/gists{/gist_id}","starred_url":"https://api.github.com/users/cheme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheme/subscriptions","organizations_url":"https://api.github.com/users/cheme/orgs","repos_url":"https://api.github.com/users/cheme/repos","events_url":"https://api.github.com/users/cheme/events{/privacy}","received_events_url":"https://api.github.com/users/cheme/received_events","type":"User","site_admin":false},"body":"Useless (just wanted to keep proto looks but does not need to be here).","created_at":"2018-08-13T08:13:17Z","updated_at":"2018-08-13T08:13:17Z","html_url":"https://github.com/libp2p/rust-libp2p/pull/386#discussion_r209523312","pull_request_url":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/386","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/comments/209523312"},"html":{"href":"https://github.com/libp2p/rust-libp2p/pull/386#discussion_r209523312"},"pull_request":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/386"}},"in_reply_to_id":209458621},"pull_request":{"url":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/386","id":205747488,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1NzQ3NDg4","html_url":"https://github.com/libp2p/rust-libp2p/pull/386","diff_url":"https://github.com/libp2p/rust-libp2p/pull/386.diff","patch_url":"https://github.com/libp2p/rust-libp2p/pull/386.patch","issue_url":"https://api.github.com/repos/libp2p/rust-libp2p/issues/386","number":386,"state":"closed","locked":false,"title":"remove rustc-serialize (#359)","user":{"login":"cheme","id":1726091,"node_id":"MDQ6VXNlcjE3MjYwOTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1726091?v=4","gravatar_id":"","url":"https://api.github.com/users/cheme","html_url":"https://github.com/cheme","followers_url":"https://api.github.com/users/cheme/followers","following_url":"https://api.github.com/users/cheme/following{/other_user}","gists_url":"https://api.github.com/users/cheme/gists{/gist_id}","starred_url":"https://api.github.com/users/cheme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheme/subscriptions","organizations_url":"https://api.github.com/users/cheme/orgs","repos_url":"https://api.github.com/users/cheme/repos","events_url":"https://api.github.com/users/cheme/events{/privacy}","received_events_url":"https://api.github.com/users/cheme/received_events","type":"User","site_admin":false},"body":"In this commit I replace rust-serialize with RustSerialize project aes-ctr crate.\r\nFixes #383 \r\nNote that to avoid any api changes,  I do not transmit a possible encoding error (the error seems a bit unlikely to occurs : end of keystream), it will likely panic on failure.\r\n\r\nThis should also fix #371 but it needs to be tested.\r\n\r\nTo use aes native instruction, the following rust-flags must be use `RUSTFLAGS=\"-C target-feature=+aes,+ssse3\" RUSTDOCFLAGS=\"-C target-feature=+aes,+ssse3\"`.\r\n\r\nI also add a feature 'aes-all' for including both version of the aes lib (aes-ni or aes-soft) and choose at runtime (with 'is_86_feature_enabled' macro) which one to use.\r\nI do not believe if there is still a lot of x86 without support for aes or ssse3 and this feature may not be usefull (not activated by default and I would understand if we want to get rid of it).\r\n","created_at":"2018-08-02T14:07:25Z","updated_at":"2018-08-13T08:13:17Z","closed_at":"2018-08-10T16:27:21Z","merged_at":"2018-08-10T16:27:21Z","merge_commit_sha":"73996885cb2d645ee91361204c33e7039290aabc","assignee":{"login":"tomaka","id":1412254,"node_id":"MDQ6VXNlcjE0MTIyNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1412254?v=4","gravatar_id":"","url":"https://api.github.com/users/tomaka","html_url":"https://github.com/tomaka","followers_url":"https://api.github.com/users/tomaka/followers","following_url":"https://api.github.com/users/tomaka/following{/other_user}","gists_url":"https://api.github.com/users/tomaka/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaka/subscriptions","organizations_url":"https://api.github.com/users/tomaka/orgs","repos_url":"https://api.github.com/users/tomaka/repos","events_url":"https://api.github.com/users/tomaka/events{/privacy}","received_events_url":"https://api.github.com/users/tomaka/received_events","type":"User","site_admin":false},"assignees":[{"login":"gnunicorn","id":40496,"node_id":"MDQ6VXNlcjQwNDk2","avatar_url":"https://avatars1.githubusercontent.com/u/40496?v=4","gravatar_id":"","url":"https://api.github.com/users/gnunicorn","html_url":"https://github.com/gnunicorn","followers_url":"https://api.github.com/users/gnunicorn/followers","following_url":"https://api.github.com/users/gnunicorn/following{/other_user}","gists_url":"https://api.github.com/users/gnunicorn/gists{/gist_id}","starred_url":"https://api.github.com/users/gnunicorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnunicorn/subscriptions","organizations_url":"https://api.github.com/users/gnunicorn/orgs","repos_url":"https://api.github.com/users/gnunicorn/repos","events_url":"https://api.github.com/users/gnunicorn/events{/privacy}","received_events_url":"https://api.github.com/users/gnunicorn/received_events","type":"User","site_admin":false},{"login":"tomaka","id":1412254,"node_id":"MDQ6VXNlcjE0MTIyNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1412254?v=4","gravatar_id":"","url":"https://api.github.com/users/tomaka","html_url":"https://github.com/tomaka","followers_url":"https://api.github.com/users/tomaka/followers","following_url":"https://api.github.com/users/tomaka/following{/other_user}","gists_url":"https://api.github.com/users/tomaka/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaka/subscriptions","organizations_url":"https://api.github.com/users/tomaka/orgs","repos_url":"https://api.github.com/users/tomaka/repos","events_url":"https://api.github.com/users/tomaka/events{/privacy}","received_events_url":"https://api.github.com/users/tomaka/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/386/commits","review_comments_url":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/386/comments","review_comment_url":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libp2p/rust-libp2p/issues/386/comments","statuses_url":"https://api.github.com/repos/libp2p/rust-libp2p/statuses/eb2a9d51fc45ce21cb797f91282b611f5009ea3b","head":{"label":"cheme:RustCrypto_switch","ref":"RustCrypto_switch","sha":"eb2a9d51fc45ce21cb797f91282b611f5009ea3b","user":{"login":"cheme","id":1726091,"node_id":"MDQ6VXNlcjE3MjYwOTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1726091?v=4","gravatar_id":"","url":"https://api.github.com/users/cheme","html_url":"https://github.com/cheme","followers_url":"https://api.github.com/users/cheme/followers","following_url":"https://api.github.com/users/cheme/following{/other_user}","gists_url":"https://api.github.com/users/cheme/gists{/gist_id}","starred_url":"https://api.github.com/users/cheme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheme/subscriptions","organizations_url":"https://api.github.com/users/cheme/orgs","repos_url":"https://api.github.com/users/cheme/repos","events_url":"https://api.github.com/users/cheme/events{/privacy}","received_events_url":"https://api.github.com/users/cheme/received_events","type":"User","site_admin":false},"repo":{"id":143263464,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMyNjM0NjQ=","name":"rust-libp2p","full_name":"cheme/rust-libp2p","owner":{"login":"cheme","id":1726091,"node_id":"MDQ6VXNlcjE3MjYwOTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1726091?v=4","gravatar_id":"","url":"https://api.github.com/users/cheme","html_url":"https://github.com/cheme","followers_url":"https://api.github.com/users/cheme/followers","following_url":"https://api.github.com/users/cheme/following{/other_user}","gists_url":"https://api.github.com/users/cheme/gists{/gist_id}","starred_url":"https://api.github.com/users/cheme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheme/subscriptions","organizations_url":"https://api.github.com/users/cheme/orgs","repos_url":"https://api.github.com/users/cheme/repos","events_url":"https://api.github.com/users/cheme/events{/privacy}","received_events_url":"https://api.github.com/users/cheme/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cheme/rust-libp2p","description":"The Rust Implementation of libp2p networking stack. ","fork":true,"url":"https://api.github.com/repos/cheme/rust-libp2p","forks_url":"https://api.github.com/repos/cheme/rust-libp2p/forks","keys_url":"https://api.github.com/repos/cheme/rust-libp2p/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cheme/rust-libp2p/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cheme/rust-libp2p/teams","hooks_url":"https://api.github.com/repos/cheme/rust-libp2p/hooks","issue_events_url":"https://api.github.com/repos/cheme/rust-libp2p/issues/events{/number}","events_url":"https://api.github.com/repos/cheme/rust-libp2p/events","assignees_url":"https://api.github.com/repos/cheme/rust-libp2p/assignees{/user}","branches_url":"https://api.github.com/repos/cheme/rust-libp2p/branches{/branch}","tags_url":"https://api.github.com/repos/cheme/rust-libp2p/tags","blobs_url":"https://api.github.com/repos/cheme/rust-libp2p/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cheme/rust-libp2p/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cheme/rust-libp2p/git/refs{/sha}","trees_url":"https://api.github.com/repos/cheme/rust-libp2p/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cheme/rust-libp2p/statuses/{sha}","languages_url":"https://api.github.com/repos/cheme/rust-libp2p/languages","stargazers_url":"https://api.github.com/repos/cheme/rust-libp2p/stargazers","contributors_url":"https://api.github.com/repos/cheme/rust-libp2p/contributors","subscribers_url":"https://api.github.com/repos/cheme/rust-libp2p/subscribers","subscription_url":"https://api.github.com/repos/cheme/rust-libp2p/subscription","commits_url":"https://api.github.com/repos/cheme/rust-libp2p/commits{/sha}","git_commits_url":"https://api.github.com/repos/cheme/rust-libp2p/git/commits{/sha}","comments_url":"https://api.github.com/repos/cheme/rust-libp2p/comments{/number}","issue_comment_url":"https://api.github.com/repos/cheme/rust-libp2p/issues/comments{/number}","contents_url":"https://api.github.com/repos/cheme/rust-libp2p/contents/{+path}","compare_url":"https://api.github.com/repos/cheme/rust-libp2p/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cheme/rust-libp2p/merges","archive_url":"https://api.github.com/repos/cheme/rust-libp2p/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cheme/rust-libp2p/downloads","issues_url":"https://api.github.com/repos/cheme/rust-libp2p/issues{/number}","pulls_url":"https://api.github.com/repos/cheme/rust-libp2p/pulls{/number}","milestones_url":"https://api.github.com/repos/cheme/rust-libp2p/milestones{/number}","notifications_url":"https://api.github.com/repos/cheme/rust-libp2p/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cheme/rust-libp2p/labels{/name}","releases_url":"https://api.github.com/repos/cheme/rust-libp2p/releases{/id}","deployments_url":"https://api.github.com/repos/cheme/rust-libp2p/deployments","created_at":"2018-08-02T08:10:48Z","updated_at":"2018-08-02T08:10:50Z","pushed_at":"2018-08-13T07:43:40Z","git_url":"git://github.com/cheme/rust-libp2p.git","ssh_url":"git@github.com:cheme/rust-libp2p.git","clone_url":"https://github.com/cheme/rust-libp2p.git","svn_url":"https://github.com/cheme/rust-libp2p","homepage":"https://libp2p.io","size":1419,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"libp2p:master","ref":"master","sha":"d94fe1b8311e8192c73945f9fc5fb16edff77f15","user":{"login":"libp2p","id":14838238,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0ODM4MjM4","avatar_url":"https://avatars3.githubusercontent.com/u/14838238?v=4","gravatar_id":"","url":"https://api.github.com/users/libp2p","html_url":"https://github.com/libp2p","followers_url":"https://api.github.com/users/libp2p/followers","following_url":"https://api.github.com/users/libp2p/following{/other_user}","gists_url":"https://api.github.com/users/libp2p/gists{/gist_id}","starred_url":"https://api.github.com/users/libp2p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libp2p/subscriptions","organizations_url":"https://api.github.com/users/libp2p/orgs","repos_url":"https://api.github.com/users/libp2p/repos","events_url":"https://api.github.com/users/libp2p/events{/privacy}","received_events_url":"https://api.github.com/users/libp2p/received_events","type":"Organization","site_admin":false},"repo":{"id":86106381,"node_id":"MDEwOlJlcG9zaXRvcnk4NjEwNjM4MQ==","name":"rust-libp2p","full_name":"libp2p/rust-libp2p","owner":{"login":"libp2p","id":14838238,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0ODM4MjM4","avatar_url":"https://avatars3.githubusercontent.com/u/14838238?v=4","gravatar_id":"","url":"https://api.github.com/users/libp2p","html_url":"https://github.com/libp2p","followers_url":"https://api.github.com/users/libp2p/followers","following_url":"https://api.github.com/users/libp2p/following{/other_user}","gists_url":"https://api.github.com/users/libp2p/gists{/gist_id}","starred_url":"https://api.github.com/users/libp2p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libp2p/subscriptions","organizations_url":"https://api.github.com/users/libp2p/orgs","repos_url":"https://api.github.com/users/libp2p/repos","events_url":"https://api.github.com/users/libp2p/events{/privacy}","received_events_url":"https://api.github.com/users/libp2p/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libp2p/rust-libp2p","description":"The Rust Implementation of libp2p networking stack. ","fork":false,"url":"https://api.github.com/repos/libp2p/rust-libp2p","forks_url":"https://api.github.com/repos/libp2p/rust-libp2p/forks","keys_url":"https://api.github.com/repos/libp2p/rust-libp2p/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libp2p/rust-libp2p/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libp2p/rust-libp2p/teams","hooks_url":"https://api.github.com/repos/libp2p/rust-libp2p/hooks","issue_events_url":"https://api.github.com/repos/libp2p/rust-libp2p/issues/events{/number}","events_url":"https://api.github.com/repos/libp2p/rust-libp2p/events","assignees_url":"https://api.github.com/repos/libp2p/rust-libp2p/assignees{/user}","branches_url":"https://api.github.com/repos/libp2p/rust-libp2p/branches{/branch}","tags_url":"https://api.github.com/repos/libp2p/rust-libp2p/tags","blobs_url":"https://api.github.com/repos/libp2p/rust-libp2p/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libp2p/rust-libp2p/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libp2p/rust-libp2p/git/refs{/sha}","trees_url":"https://api.github.com/repos/libp2p/rust-libp2p/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libp2p/rust-libp2p/statuses/{sha}","languages_url":"https://api.github.com/repos/libp2p/rust-libp2p/languages","stargazers_url":"https://api.github.com/repos/libp2p/rust-libp2p/stargazers","contributors_url":"https://api.github.com/repos/libp2p/rust-libp2p/contributors","subscribers_url":"https://api.github.com/repos/libp2p/rust-libp2p/subscribers","subscription_url":"https://api.github.com/repos/libp2p/rust-libp2p/subscription","commits_url":"https://api.github.com/repos/libp2p/rust-libp2p/commits{/sha}","git_commits_url":"https://api.github.com/repos/libp2p/rust-libp2p/git/commits{/sha}","comments_url":"https://api.github.com/repos/libp2p/rust-libp2p/comments{/number}","issue_comment_url":"https://api.github.com/repos/libp2p/rust-libp2p/issues/comments{/number}","contents_url":"https://api.github.com/repos/libp2p/rust-libp2p/contents/{+path}","compare_url":"https://api.github.com/repos/libp2p/rust-libp2p/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libp2p/rust-libp2p/merges","archive_url":"https://api.github.com/repos/libp2p/rust-libp2p/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libp2p/rust-libp2p/downloads","issues_url":"https://api.github.com/repos/libp2p/rust-libp2p/issues{/number}","pulls_url":"https://api.github.com/repos/libp2p/rust-libp2p/pulls{/number}","milestones_url":"https://api.github.com/repos/libp2p/rust-libp2p/milestones{/number}","notifications_url":"https://api.github.com/repos/libp2p/rust-libp2p/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libp2p/rust-libp2p/labels{/name}","releases_url":"https://api.github.com/repos/libp2p/rust-libp2p/releases{/id}","deployments_url":"https://api.github.com/repos/libp2p/rust-libp2p/deployments","created_at":"2017-03-24T20:05:11Z","updated_at":"2018-08-12T14:07:25Z","pushed_at":"2018-08-11T15:31:56Z","git_url":"git://github.com/libp2p/rust-libp2p.git","ssh_url":"git@github.com:libp2p/rust-libp2p.git","clone_url":"https://github.com/libp2p/rust-libp2p.git","svn_url":"https://github.com/libp2p/rust-libp2p","homepage":"https://libp2p.io","size":1408,"stargazers_count":365,"watchers_count":365,"language":"Rust","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"archived":false,"open_issues_count":90,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":48,"open_issues":90,"watchers":365,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/386"},"html":{"href":"https://github.com/libp2p/rust-libp2p/pull/386"},"issue":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/issues/386"},"comments":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/issues/386/comments"},"review_comments":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/386/comments"},"review_comment":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/pulls/386/commits"},"statuses":{"href":"https://api.github.com/repos/libp2p/rust-libp2p/statuses/eb2a9d51fc45ce21cb797f91282b611f5009ea3b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cheme"}}