aboutsummaryrefslogtreecommitdiff
path: root/src/igd_actor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/igd_actor.rs')
-rw-r--r--src/igd_actor.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/igd_actor.rs b/src/igd_actor.rs
index 4ff5f53..bb9099e 100644
--- a/src/igd_actor.rs
+++ b/src/igd_actor.rs
@@ -1,15 +1,16 @@
-use crate::messages;
+use std::net::SocketAddrV4;
+
use anyhow::{Context, Result};
-use igd::aio::*;
-use igd::PortMappingProtocol;
+use igd::{aio::*, PortMappingProtocol};
use log::*;
-use std::net::SocketAddrV4;
use tokio::{
select,
sync::watch,
time::{self, Duration},
};
+use crate::messages;
+
pub struct IgdActor {
last_ports: messages::PublicExposedPorts,
rx_ports: watch::Receiver<messages::PublicExposedPorts>,
@@ -40,7 +41,7 @@ impl IgdActor {
last_ports: messages::PublicExposedPorts::new(),
};
- return Ok(ctx);
+ return Ok(ctx)
}
pub async fn listen(&mut self) -> Result<()> {
@@ -92,6 +93,6 @@ impl IgdActor {
}
}
- return Ok(());
+ return Ok(())
}
}