Context
This issue was identified during the review of PR #82 and requested by @leynos.
Description
The test function run_respects_env_override_for_ninja in tests/runner_tests.rs uses unsafe blocks when calling std::env::set_var and std::env::remove_var. These functions are safe to call and do not require unsafe blocks.
The unnecessary unsafe blocks should be removed while maintaining the existing logic that:
- Saves the original environment variable value
- Sets the override for testing
- Runs the test
- Restores the original state
References
Files affected
tests/runner_tests.rs (Lines 166-202)
Context
This issue was identified during the review of PR #82 and requested by @leynos.
Description
The test function
run_respects_env_override_for_ninjaintests/runner_tests.rsusesunsafeblocks when callingstd::env::set_varandstd::env::remove_var. These functions are safe to call and do not requireunsafeblocks.The unnecessary
unsafeblocks should be removed while maintaining the existing logic that:References
Files affected
tests/runner_tests.rs(Lines 166-202)