proxy: Cleaned up a left-up
It was left after previous attempt to proxy implementation.
@@ -166,14 +166,6 @@ pub struct Proxy {
nodes: Vec<InternalNode>,
}
-/* This specialization is needed to avoid inference problem.
-The exact number is irrelevant. */
-impl Proxy {
- pub fn builder() -> ProxyBuilder {
- ProxyBuilder { nodes: vec![] }
- }
-}
-
impl Proxy {
pub fn new(nodes: impl IntoIterator<Item = Node>) -> Self {
Proxy {
@@ -196,6 +188,10 @@ impl Proxy {
}
}
+ pub fn builder() -> ProxyBuilder {
+ ProxyBuilder { nodes: vec![] }
+ }
+
/// Build a translation map based on provided proxy and node addresses.
/// The map can be passed to `Session` `address_translator()` to ensure
/// that the driver contacts the nodes through the proxy (and not directly).
@@ -382,6 +378,7 @@ impl Doorkeeper {
tokio::task::spawn(doorkeeper.run());
Ok(())
}
+
async fn run(mut self) {
let mut own_terminate_notifier = self.terminate_signaler.subscribe();
let (connection_close_tx, _connection_close_rx) = broadcast::channel::<()>(2);
