Merge pull request #59 from tomaka/plain-text-rename

Rename PlainText to PlainTextConfig
This commit is contained in:
Robert Habermeier
2017-12-06 12:15:23 +01:00
committed by GitHub
4 changed files with 6 additions and 6 deletions

View File

@ -47,7 +47,7 @@ fn main() {
let tcp = TcpConfig::new(core.handle());
let with_secio = tcp
.with_upgrade(swarm::PlainText)
.with_upgrade(swarm::PlainTextConfig)
.or_upgrade({
let private_key = {
let pkcs8 = include_bytes!("test-private-key.pk8");

View File

@ -47,7 +47,7 @@ fn main() {
let tcp = TcpConfig::new(core.handle());
let with_secio = tcp
.with_upgrade(swarm::PlainText)
.with_upgrade(swarm::PlainTextConfig)
.or_upgrade({
let private_key = {
let pkcs8 = include_bytes!("test-private-key.pk8");

View File

@ -148,4 +148,4 @@ pub mod transport;
pub use self::connection_reuse::ConnectionReuse;
pub use self::multiaddr::Multiaddr;
pub use self::muxing::StreamMuxer;
pub use self::transport::{ConnectionUpgrade, PlainText, Transport, UpgradedNode, OrUpgrade};
pub use self::transport::{ConnectionUpgrade, PlainTextConfig, Transport, UpgradedNode, OrUpgrade};

View File

@ -448,11 +448,11 @@ impl<A, B, AId, BId> Iterator for NamesIterChain<A, B>
/// simply passes communications through without doing anything more.
///
/// > **Note**: Generally used as an alternative to `secio` if a security layer is not desirable.
// TODO: move `PlainText` to a separate crate?
// TODO: move `PlainTextConfig` to a separate crate?
#[derive(Debug, Copy, Clone)]
pub struct PlainText;
pub struct PlainTextConfig;
impl<C> ConnectionUpgrade<C> for PlainText
impl<C> ConnectionUpgrade<C> for PlainTextConfig
where C: AsyncRead + AsyncWrite
{
type Output = C;