diff options
author | Vika <vika@fireburn.ru> | 2021-05-04 23:12:59 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2021-05-04 23:12:59 +0300 |
commit | 5b65175710a19daf43c81e52e180fd66ecfe4353 (patch) | |
tree | 40527b7b61a425926fb0b3a34ec782bda4b8d79d /src/main.rs | |
parent | 1a78c48bd86ff72cc9c7020e69ec9a77302a2f8b (diff) | |
download | kittybox-5b65175710a19daf43c81e52e180fd66ecfe4353.tar.zst |
Clippy lints
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 3d0831e..778aa4a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,5 @@ use std::env; use log::{error,info,debug}; -use env_logger; use surf::Url; use kittybox_micropub as micropub; @@ -42,7 +41,7 @@ async fn main() -> Result<(), std::io::Error> { } let media_endpoint: Option<String> = env::var("MEDIA_ENDPOINT").ok(); - let host = env::var("SERVE_AT").ok().unwrap_or("0.0.0.0:8080".to_string()); + let host = env::var("SERVE_AT").ok().unwrap_or_else(|| "0.0.0.0:8080".to_string()); let app = micropub::get_app_with_redis(token_endpoint, redis_uri, media_endpoint).await; app.listen(host).await } \ No newline at end of file |