Migrate all examples to use std::env::var_os (#312)

This commit is contained in:
Andrei Zolkin
2021-09-12 17:39:43 +02:00
committed by GitHub
parent 3741e16cf2
commit 9df57e6ff2
21 changed files with 21 additions and 21 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ use tower_http::trace::TraceLayer;
#[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_testing=debug,tower_http=debug")
}
tracing_subscriber::fmt::init();