c2pa-rs
c2pa-rs copied to clipboard
set_var unsafe errors in the CLI code
In /cli/src/main.rs on line 543, env::set_var is used:
std::env::set_var("RUST_LOG", "error");
According to Rust documentation (https://doc.rust-lang.org/std/env/fn.set_var.html), the set_var function is considered unsafe and it throws a compiler warning in newer compiler versions.
| std::env::set_var("RUST_LOG", "error");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
This command should give the same result without the unsafe function call:
env_logger::Builder::from_env(Env::default().default_filter_or("error")).init();