summaryrefslogtreecommitdiff
path: root/src/client/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/main.rs')
-rw-r--r--src/client/main.rs76
1 files changed, 48 insertions, 28 deletions
diff --git a/src/client/main.rs b/src/client/main.rs
index 0669197..699e17e 100644
--- a/src/client/main.rs
+++ b/src/client/main.rs
@@ -1,5 +1,12 @@
-#![allow(incomplete_features, clippy::redundant_field_names)]
-#![feature(associated_type_defaults, never_type, lazy_type_alias)]
+#![allow(
+ incomplete_features,
+ clippy::redundant_field_names
+)]
+#![feature(
+ associated_type_defaults,
+ never_type,
+ lazy_type_alias
+)]
use crate::client::Client;
use crate::connector::httpconnector::HTTPConnector;
@@ -14,34 +21,47 @@ pub(crate) mod connector;
fn main() {
#[cfg(not(debug_assertions))]
{
- _ = Signals::new([
- SIGHUP,
- SIGINT,
- SIGQUIT,
- SIGTRAP,
- SIGABRT,
- SIGPIPE,
- SIGALRM,
- SIGTERM,
- SIGUSR1,
- SIGUSR2,
- SIGCHLD,
- SIGCONT,
- SIGTSTP,
- SIGTTIN,
- SIGTTOU,
- SIGURG,
- SIGXCPU,
- SIGXFSZ,
- SIGVTALRM,
- SIGPROF,
- SIGWINCH,
- #[cfg(any(target_os = "linux", target_os = "android"))]
- SIGSYS,
- ]); // discard err
+ _ = Signals::new(
+ [
+ SIGHUP,
+ SIGINT,
+ SIGQUIT,
+ SIGTRAP,
+ SIGABRT,
+ SIGPIPE,
+ SIGALRM,
+ SIGTERM,
+ SIGUSR1,
+ SIGUSR2,
+ SIGCHLD,
+ SIGCONT,
+ SIGTSTP,
+ SIGTTIN,
+ SIGTTOU,
+ SIGURG,
+ SIGXCPU,
+ SIGXFSZ,
+ SIGVTALRM,
+ SIGPROF,
+ SIGWINCH,
+ #[cfg(
+ any(
+ target_os = "linux",
+ target_os = "android"
+ )
+ )]
+ SIGSYS,
+ ],
+ ); // discard err
}
let ip = "http://127.0.0.1:8081";
- let client = Client::new(HTTPConnector::new(ip, ip, "/").unwrap()).unwrap();
+ let client = Client::new(
+ HTTPConnector::new(
+ ip, ip, "/",
+ )
+ .unwrap(),
+ )
+ .unwrap();
client.enter_loop();
}