diff options
| author | Fuwn <[email protected]> | 2026-01-21 14:53:49 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-01-21 14:53:49 +0000 |
| commit | 3b9b895dafe650262207f79819f9d301c212a60a (patch) | |
| tree | 63b0d793c67ddb067b5ce374cae42bde4c050d97 | |
| parent | fix(html,url): Resolve clippy pedantic lints and reduce allocations (diff) | |
| download | september-3b9b895dafe650262207f79819f9d301c212a60a.tar.xz september-3b9b895dafe650262207f79819f9d301c212a60a.zip | |
fix(main): Remove deprecated std::env::set_var use
| -rw-r--r-- | src/main.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 070612c..56402c9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,9 +20,13 @@ use {actix_web::web, response::default, std::env::var}; #[actix_web::main] async fn main() -> std::io::Result<()> { - std::env::set_var("RUST_LOG", "actix_web=info"); dotenv::dotenv().ok(); - pretty_env_logger::init(); + pretty_env_logger::formatted_builder() + .parse_filters( + &std::env::var("RUST_LOG") + .unwrap_or_else(|_| "actix_web=info".to_string()), + ) + .init(); actix_web::HttpServer::new(move || { actix_web::App::new() |