Skip to content

Commit

Permalink
remove unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
ozabalaferrera committed Nov 1, 2024
1 parent bf18f7c commit c195938
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions example-projects/axum-example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ fn echo_app() -> Router {
#[tokio::main]
async fn main() {
if std::env::var("RUST_LOG").is_err() {
unsafe {
std::env::set_var("RUST_LOG", "axum_example=debug,tower_http=debug")
}
std::env::set_var("RUST_LOG", "axum_example=debug,tower_http=debug")
}
tracing_subscriber::fmt::init();
let service = echo_app();
Expand All @@ -49,12 +47,7 @@ mod tests {
#[tokio::test]
async fn axum_mod_test() {
if std::env::var("RUST_LOG").is_err() {
unsafe {
std::env::set_var(
"RUST_LOG",
"axum_example=debug,tower_http=debug",
)
}
std::env::set_var("RUST_LOG", "axum_example=debug,tower_http=debug")
}
tracing_subscriber::fmt::init();

Expand Down

0 comments on commit c195938

Please sign in to comment.