forked from lavina/lavina
update hyper to 1.0 and other libs
This commit is contained in:
parent
cefd6f8df0
commit
77d175ccd9
File diff suppressed because it is too large
Load Diff
|
@ -41,8 +41,9 @@ publish = false
|
|||
[dependencies]
|
||||
anyhow.workspace = true
|
||||
figment = { version = "0.10.8", features = ["env", "toml"] } # configuration files
|
||||
hyper = { version = "1.0.0-rc.3,<1.0.0-rc.4", features = ["server", "http1"] } # http server
|
||||
http-body-util = "0.1.0-rc.3"
|
||||
hyper = { version = "1.0.1", features = ["server", "http1"] } # http server
|
||||
http-body-util = "0.1.0"
|
||||
hyper-util = { version = "0.1", features = ["server", "http1", "tokio"] }
|
||||
serde.workspace = true
|
||||
serde_json = "1.0.93"
|
||||
tokio.workspace = true
|
||||
|
|
|
@ -7,6 +7,7 @@ use hyper::body::Bytes;
|
|||
use hyper::server::conn::http1;
|
||||
use hyper::service::service_fn;
|
||||
use hyper::{Method, Request, Response, StatusCode};
|
||||
use hyper_util::rt::TokioIo;
|
||||
use prometheus::{Encoder, Registry as MetricsRegistry, TextEncoder};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tokio::net::TcpListener;
|
||||
|
@ -52,6 +53,7 @@ async fn main_loop(
|
|||
_ = &mut termination => break,
|
||||
result = listener.accept() => {
|
||||
let (stream, _) = result?;
|
||||
let stream = TokioIo::new(stream);
|
||||
let metrics = metrics.clone();
|
||||
let rooms = rooms.clone();
|
||||
let storage = storage.clone();
|
||||
|
|
Loading…
Reference in New Issue