Skip to content

Conversation

@aescling
Copy link

env::remove_var is newly marked unsafe in the 2024 edition due to its inherent unreliability in multithreaded contexts.

This code is single-threaded so there should be no problem.

See https://doc.rust-lang.org/edition-guide/rust-2024/newly-unsafe-functions.html#stdenvset_var-remove_var

Fixes #80

env::remove_var is newly marked unsafe in the 2024 edition due to its
inherent unreliability in multithreaded contexts.

This code is single-threaded so there should be no problem.

See https://doc.rust-lang.org/edition-guide/rust-2024/newly-unsafe-functions.html#stdenvset_var-remove_var
@beeender
Copy link
Owner

Interesting, and thanks for the PR!

@beeender beeender merged commit f5fa9f1 into beeender:master Jul 23, 2025
1 check passed
@beeender
Copy link
Owner

@all-contributors please add @aescling for code

@allcontributors
Copy link
Contributor

@beeender

I've put up a pull request to add @aescling! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failure because env::remove_var is now unsafe

2 participants