Skip to content

Commit 2f87d10

Browse files
joshwilhelmiclaude
andcommitted
[gobby-cli-#73] Wrap env var calls in unsafe blocks for Rust 2024 edition
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e046f3c commit 2f87d10

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

crates/gcode/src/savings.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,24 +92,24 @@ mod tests {
9292

9393
#[test]
9494
fn test_resolve_daemon_url_env_var() {
95-
std::env::set_var("GOBBY_PORT", "12345");
95+
unsafe { std::env::set_var("GOBBY_PORT", "12345") };
9696
let url = resolve_daemon_url(None);
9797
assert_eq!(url, Some("http://localhost:12345".to_string()));
98-
std::env::remove_var("GOBBY_PORT");
98+
unsafe { std::env::remove_var("GOBBY_PORT") };
9999
}
100100

101101
#[test]
102102
fn test_resolve_daemon_url_default() {
103-
std::env::remove_var("GOBBY_PORT");
103+
unsafe { std::env::remove_var("GOBBY_PORT") };
104104
let url = resolve_daemon_url(None);
105105
assert_eq!(url, Some("http://localhost:60887".to_string()));
106106
}
107107

108108
#[test]
109109
fn test_resolve_daemon_url_expand_port() {
110-
std::env::set_var("GOBBY_PORT", "54321");
110+
unsafe { std::env::set_var("GOBBY_PORT", "54321") };
111111
let url = resolve_daemon_url(Some("http://myhost:${GOBBY_PORT}"));
112112
assert_eq!(url, Some("http://myhost:54321".to_string()));
113-
std::env::remove_var("GOBBY_PORT");
113+
unsafe { std::env::remove_var("GOBBY_PORT") };
114114
}
115115
}

0 commit comments

Comments
 (0)