[web] Use the asyncio block_on

This commit is contained in:
Emi Simpson 2021-11-07 12:29:02 -05:00
parent adcbae08ca
commit 57e1b5c85b
Signed by: Emi
GPG key ID: A12F2C2FFDC3D847
2 changed files with 3 additions and 1 deletions

View file

@ -10,6 +10,7 @@ pronouns_today = {path = ".."}
async-scgi = "0.1.0"
async-executor = "1.4"
async-net = "1.6"
async-io = "1.6"
futures-lite = "1.12"
log = "0.4"
env_logger = "0.9"

View file

@ -8,6 +8,7 @@ use async_net::unix::UnixListener;
use crate::configuration::Conf;
use std::io::IoSlice;
use crate::statics::StaticAsset;
use async_io::block_on;
use async_net::TcpListener;
use async_executor::LocalExecutor;
use futures_lite::io::AsyncWriteExt;
@ -69,7 +70,7 @@ fn main() {
let executor = LocalExecutor::new();
log::info!("Starting with configuration {:?}", config);
futures_lite::future::block_on(executor.run(start_server(config, &executor))).unwrap();
block_on(executor.run(start_server(config, &executor))).unwrap();
}
}
}