Abolish ChanMgr::set_default_transport

The comment says
  // TODO pt-client: It's not clear to me that we really need this method.
and empirically, deleting it, and its callee, is fine.
This commit is contained in:
Ian Jackson 2022-11-30 16:00:31 +00:00
parent 455295457f
commit ab74506dc9
2 changed files with 0 additions and 19 deletions

View File

@ -190,12 +190,6 @@ impl CompoundFactory {
}
}
/// Replace the default factory in this object.
#[cfg(feature = "experimental-api")]
pub(crate) fn replace_default_factory(&mut self, factory: Arc<dyn ChannelFactory + 'static>) {
self.default_factory = factory;
}
#[cfg(feature = "pt-client")]
/// Replace the PtMgr in this object.
pub(crate) fn replace_ptmgr(&mut self, ptmgr: Arc<dyn AbstractPtMgr + 'static>) {

View File

@ -271,19 +271,6 @@ impl<R: Runtime> ChanMgr<R> {
Ok(r?)
}
/// Replace the channel factory that we use for making regular
/// channels to the Tor network.
///
/// This method can be used to e.g. tell Arti to use a proxy for
/// outgoing connections.
#[cfg(feature = "experimental-api")]
pub fn set_default_transport(&self, factory: Arc<dyn factory::ChannelFactory + 'static>) {
// TODO pt-client: Perhaps we actually want to take this as part of the constructor instead?
// TODO pt-client: It's not clear to me that we really need this method.
self.mgr
.with_mut_builder(|f| f.replace_default_factory(factory));
}
/// Replace the transport registry with one that may know about
/// more transports.
#[cfg(feature = "pt-client")]