Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complements to #389 #415

Merged
merged 5 commits into from
Aug 15, 2018
Merged

Complements to #389 #415

merged 5 commits into from
Aug 15, 2018

Conversation

cheme
Copy link
Contributor

@cheme cheme commented Aug 14, 2018

Some cosmetic fix and the missing copyright for #386

@@ -1,6 +1,26 @@
// Copyright 2017 Parity Technologies (UK) Ltd.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2018

@@ -35,7 +35,7 @@ mod encode;
/// Type returned by `full_codec`.
pub type FullCodec<S> = DecoderMiddleware<EncoderMiddleware<length_delimited::Framed<S>>>;

pub type StreamCipher = StreamCipherCore;
pub type StreamCipher = Box<dyn StreamCipherCore>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you do Box<dyn StreamCipherCore + Send> while you're at it? cc #369

@ghost ghost assigned tomaka Aug 15, 2018
@ghost ghost added the in progress label Aug 15, 2018
@@ -35,7 +35,7 @@ mod encode;
/// Type returned by `full_codec`.
pub type FullCodec<S> = DecoderMiddleware<EncoderMiddleware<length_delimited::Framed<S>>>;

pub type StreamCipher = StreamCipherCore;
pub type StreamCipher = Box<dyn StreamCipherCore + Send>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a nightly thing?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was stabilized in Rust 1.27. Not using dyn will become deprecated at the end of the year I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, according to the Rust 2018 roadmap.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we note somewhere that we are expecting you to use latest rust stable (or at least 1.27+)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be in the CI if we do so.

@gnunicorn gnunicorn merged commit 5b712e5 into libp2p:master Aug 15, 2018
@ghost ghost removed the in progress label Aug 15, 2018
@melekes melekes mentioned this pull request Oct 19, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants