mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-19 00:00:14 +02:00
Migrate all examples to use std::env::var_os (#312)
This commit is contained in:
@@ -16,7 +16,7 @@ use tower::{filter::AsyncFilterLayer, util::AndThenLayer, BoxError};
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
// Set the RUST_LOG, if it hasn't been explicitly defined
|
||||
if std::env::var("RUST_LOG").is_err() {
|
||||
if std::env::var_os("RUST_LOG").is_none() {
|
||||
std::env::set_var(
|
||||
"RUST_LOG",
|
||||
"example_print_request_response=debug,tower_http=debug",
|
||||
|
||||
Reference in New Issue
Block a user