Skip to content

Commit

Permalink
chore: ignore lint unsafe_op_in_unsafe_fn for usage of env::remove_var (
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC authored Jun 2, 2024
1 parent 1df1069 commit f1b1ded
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ pub unsafe fn clearenv() -> std::result::Result<(), ClearEnvError> {
} else {
use std::env;
for (name, _) in env::vars_os() {
// Ignore the lint due to Rust bug: https://github.com/rust-lang/rust/issues/125875
#[allow(unsafe_op_in_unsafe_fn)]
env::remove_var(name);
}
let ret = 0;
Expand Down

0 comments on commit f1b1ded

Please sign in to comment.