aboutsummaryrefslogtreecommitdiff
path: root/src/fw_actor.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2021-09-20 15:00:31 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2021-09-20 15:13:16 +0200
commit7d478d997620c0af41a6ffb8b3f29dc6dda2cb98 (patch)
tree03b08b4c27401b46c3e64c53e3469d2803efa3e9 /src/fw_actor.rs
parent2bbc9109991f8bb79a09a965a1d2779e1749b25b (diff)
downloaddiplonat-7d478d997620c0af41a6ffb8b3f29dc6dda2cb98.tar.gz
diplonat-7d478d997620c0af41a6ffb8b3f29dc6dda2cb98.zip
Stricter Rust formating rules and build in the CI
Diffstat (limited to 'src/fw_actor.rs')
-rw-r--r--src/fw_actor.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fw_actor.rs b/src/fw_actor.rs
index 5147a9c..0fa6e64 100644
--- a/src/fw_actor.rs
+++ b/src/fw_actor.rs
@@ -1,4 +1,7 @@
+use std::collections::HashSet;
+
use anyhow::Result;
+use iptables;
use log::*;
use tokio::{
select,
@@ -6,10 +9,7 @@ use tokio::{
time::{self, Duration},
};
-use crate::fw;
-use crate::messages;
-use iptables;
-use std::collections::HashSet;
+use crate::{fw, messages};
pub struct FirewallActor {
pub ipt: iptables::IPTables,
@@ -32,7 +32,7 @@ impl FirewallActor {
fw::setup(&ctx.ipt)?;
- return Ok(ctx);
+ return Ok(ctx)
}
pub async fn listen(&mut self) -> Result<()> {
@@ -81,6 +81,6 @@ impl FirewallActor {
fw::open_ports(&self.ipt, ports_to_open)?;
- return Ok(());
+ return Ok(())
}
}