From acc2de7b31625c5c9664eca3d699686ae4601c8f Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 30 Nov 2022 13:05:46 -0500 Subject: [PATCH] Rename TransportHelper => TransportImplHelper. --- crates/tor-chanmgr/src/builder.rs | 10 +++++----- crates/tor-chanmgr/src/factory.rs | 2 +- crates/tor-chanmgr/src/transport.rs | 4 ++-- crates/tor-chanmgr/src/transport/default.rs | 2 +- crates/tor-chanmgr/src/transport/proxied.rs | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/tor-chanmgr/src/builder.rs b/crates/tor-chanmgr/src/builder.rs index 1732518e5..665abc0d0 100644 --- a/crates/tor-chanmgr/src/builder.rs +++ b/crates/tor-chanmgr/src/builder.rs @@ -4,7 +4,7 @@ use std::io; use std::sync::{Arc, Mutex}; use crate::factory::{BootstrapReporter, ChannelFactory}; -use crate::transport::TransportHelper; +use crate::transport::TransportImplHelper; use crate::{event::ChanMgrEventSender, Error}; use std::time::Duration; @@ -28,7 +28,7 @@ use futures::task::SpawnExt; /// /// This channel builder does not retry on failure, but it _does_ implement a /// time-out. -pub struct ChanBuilder +pub struct ChanBuilder where R: tor_rtcompat::TlsProvider, { @@ -40,7 +40,7 @@ where tls_connector: >::Connector, } -impl ChanBuilder +impl ChanBuilder where R: TlsProvider, { @@ -55,7 +55,7 @@ where } } #[async_trait] -impl ChannelFactory for ChanBuilder +impl ChannelFactory for ChanBuilder where R: tor_rtcompat::TlsProvider + Send + Sync, H: Send + Sync, @@ -84,7 +84,7 @@ where } } -impl ChanBuilder +impl ChanBuilder where R: tor_rtcompat::TlsProvider + Send + Sync, H: Send + Sync, diff --git a/crates/tor-chanmgr/src/factory.rs b/crates/tor-chanmgr/src/factory.rs index 5bca4d1bf..824b59de5 100644 --- a/crates/tor-chanmgr/src/factory.rs +++ b/crates/tor-chanmgr/src/factory.rs @@ -34,7 +34,7 @@ impl BootstrapReporter { /// construct all of its channels. /// /// A `ChannelFactory` can be implemented in terms of a -/// [`TransportHelper`](crate::transport::TransportHelper), by wrapping it in a +/// [`TransportImplHelper`](crate::transport::TransportImplHelper), by wrapping it in a /// `ChanBuilder`. /// // FIXME(eta): Rectify the below situation. diff --git a/crates/tor-chanmgr/src/transport.rs b/crates/tor-chanmgr/src/transport.rs index 7b6bd2f18..bfcaa3795 100644 --- a/crates/tor-chanmgr/src/transport.rs +++ b/crates/tor-chanmgr/src/transport.rs @@ -25,14 +25,14 @@ pub use proxied::ProxyError; /// TLS over some stream-like type, and you only want to define the stream-like /// type. /// -/// To convert a [`TransportHelper`] into a +/// To convert a [`TransportImplHelper`] into a /// [`ChannelFactory`](crate::factory::ChannelFactory), wrap it in a /// `ChanBuilder`. // // TODO: Maybe move this to a separate crate so that tor-ptmgr can be // used without having to depend on chanmgr. #[async_trait] -pub trait TransportHelper { +pub trait TransportImplHelper { /// The type of the resulting stream. type Stream: AsyncRead + AsyncWrite + Send + Sync + 'static; diff --git a/crates/tor-chanmgr/src/transport/default.rs b/crates/tor-chanmgr/src/transport/default.rs index c6a4d9b49..dfe3ed2d9 100644 --- a/crates/tor-chanmgr/src/transport/default.rs +++ b/crates/tor-chanmgr/src/transport/default.rs @@ -31,7 +31,7 @@ impl DefaultTransport { } #[async_trait] -impl crate::transport::TransportHelper for DefaultTransport { +impl crate::transport::TransportImplHelper for DefaultTransport { type Stream = ::TcpStream; /// Implements the transport: makes a TCP connection (possibly diff --git a/crates/tor-chanmgr/src/transport/proxied.rs b/crates/tor-chanmgr/src/transport/proxied.rs index 9004fb32b..e27467ab9 100644 --- a/crates/tor-chanmgr/src/transport/proxied.rs +++ b/crates/tor-chanmgr/src/transport/proxied.rs @@ -28,7 +28,7 @@ use tor_socksproto::{ }; #[cfg(feature = "pt-client")] -use super::TransportHelper; +use super::TransportImplHelper; #[cfg(feature = "pt-client")] use async_trait::async_trait; #[cfg(feature = "pt-client")] @@ -285,7 +285,7 @@ impl ExternalProxyPlugin { #[cfg(feature = "pt-client")] #[async_trait] -impl TransportHelper for ExternalProxyPlugin { +impl TransportImplHelper for ExternalProxyPlugin { type Stream = R::TcpStream; async fn connect(