refactort

This commit is contained in:
open-trade
2022-01-05 14:38:38 +08:00
parent 1d8cdb5e93
commit 78097f4006
2 changed files with 4 additions and 15 deletions

View File

@@ -32,6 +32,7 @@ lazy_static::lazy_static! {
}
static SHOULD_EXIT: AtomicBool = AtomicBool::new(false);
#[derive(Clone)]
pub struct RendezvousMediator {
addr: TargetAddr<'static>,
host: String,
@@ -40,18 +41,6 @@ pub struct RendezvousMediator {
last_id_pk_registry: String,
}
impl Clone for RendezvousMediator {
fn clone(&self) -> Self {
Self {
addr: self.addr.to_owned(),
host: self.host.clone(),
host_prefix: self.host_prefix.clone(),
rendezvous_servers: self.rendezvous_servers.clone(),
last_id_pk_registry: self.last_id_pk_registry.clone(),
}
}
}
impl RendezvousMediator {
pub async fn start_all() {
let mut nat_tested = false;