Skip to content

Commit

Permalink
style(backend): fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ravenclaw900 committed Jul 25, 2023
1 parent af06e9b commit 193d15e
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,14 @@ async fn main() -> anyhow::Result<()> {
&CONFIG.cert,
&CONFIG.key,
flexible_hyper_server_tls::tlsconfig::HttpProtocol::Http1,
).context("Couldn't get TLS config")?;
)
.context("Couldn't get TLS config")?;

flexible_hyper_server_tls::HyperHttpOrHttpsAcceptor::new_https(tcp, tls_acceptor, std::time::Duration::from_secs(10))
flexible_hyper_server_tls::HyperHttpOrHttpsAcceptor::new_https(
tcp,
tls_acceptor,
std::time::Duration::from_secs(10),
)
} else {
flexible_hyper_server_tls::HyperHttpOrHttpsAcceptor::new_http(tcp)
};
Expand All @@ -71,12 +76,9 @@ async fn main() -> anyhow::Result<()> {

// Ignore result, because it will never be an error
loop {
let _res = (&mut server)
.await
.context("Server error")
.or_else(|e| {
tracing::warn!("{:?}", e);
anyhow::Ok(())
});
let _res = (&mut server).await.context("Server error").or_else(|e| {
tracing::warn!("{:?}", e);
anyhow::Ok(())
});
}
}

0 comments on commit 193d15e

Please sign in to comment.