[[package]]
name = "async-trait"
-version = "0.1.47"
+version = "0.1.48"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e098e9c493fdf92832223594d9a164f96bdf17ba81a42aff86f85c76768726a"
+checksum = "36ea56748e10732c49404c153638a15ec3d6211ec5ff35d9bb20e13b93576adf"
dependencies = [
"proc-macro2",
"quote",
[[package]]
name = "byteorder"
-version = "1.4.2"
+version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b"
+checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
[[package]]
name = "bytes"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3"
-[[package]]
-name = "listenfd"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "492158e732f2e2de81c592f0a2427e57e12cd3d59877378fe7af624b6bbe0ca1"
-dependencies = [
- "libc",
- "uuid",
- "winapi 0.3.9",
-]
-
[[package]]
name = "lock_api"
version = "0.4.2"
[[package]]
name = "syn"
-version = "1.0.62"
+version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "123a78a3596b24fee53a6464ce52d8ecbf62241e6294c7e7fe12086cd161f512"
+checksum = "8fd9bc7ccc2688b3344c2f48b9b546648b25ce0b20fc717ee7fa7981a8ca9717"
dependencies = [
"proc-macro2",
"quote",
"percent-encoding",
]
-[[package]]
-name = "uuid"
-version = "0.6.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e1436e58182935dcd9ce0add9ea0b558e8a87befe01c1a301e6020aeb0876363"
-dependencies = [
- "cfg-if 0.1.10",
-]
-
[[package]]
name = "v_escape"
version = "0.7.4"
"common",
"futures",
"itertools",
- "listenfd",
"ron",
"serde",
"sysinfo",
actix-files = "0.2"
serde = { version = "1.0", features = ["derive"] }
-listenfd = "0.3" # To watch file modifications and automatically launch a build process (only used in dev/debug).
ron = "0.6" # Rust object notation, to load configuration files.
itertools = "0.10"
# To launch the web server and watching source. See https://actix.rs/docs/autoreload/.\r
-systemfd --no-pid -s http::8082 -- cargo watch -x run
\ No newline at end of file
+cargo watch -x 'run'
\ No newline at end of file
-
-extern crate listenfd;
extern crate askama;
-// use futures::sink::With;
-use listenfd::ListenFd;
+use std::{ sync::Mutex, env::args, fs::File, io::prelude::* };
+
use actix_files as fs;
use actix_web::{ get, web, Responder, middleware, App, HttpServer };
use askama::Template;
-
-use std::{ sync::Mutex, env::args, fs::File, io::prelude::* };
use ron::{ de::from_reader, ser::{ to_string_pretty, PrettyConfig } };
use serde::{ Deserialize, Serialize };
world_path: String,
}
-fn empty_string() -> String { "".to_string() }
+fn empty_string() -> String { "".to_owned() }
impl Config {
fn default() -> Self {
let config_shared = web::Data::new(Mutex::new(config));
- let mut listenfd = ListenFd::from_env();
- let mut server =
+ let server =
HttpServer::new(
move || {
App::new()
.service(main_page)
.service(fs::Files::new("/static", "static").show_files_listing())
}
- );
-
- server =
- if let Some(l) = listenfd.take_tcp_listener(0).unwrap() {
- server.listen(l).unwrap()
- } else {
- server.bind(&format!("0.0.0.0:{}", port)).unwrap()
- };
+ )
+ .bind(&format!("0.0.0.0:{}", port))
+ .unwrap();
server.run().await
}