Skip to content

Commit 1222fef

Browse files
committed
Privatize with_saved_global_state()
1 parent f73d287 commit 1222fef

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/cli/self_update/test.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//! Support for functional tests.
22
3+
#[cfg(windows)]
34
use std::{io, sync::Mutex};
45

56
#[cfg(windows)]
@@ -9,7 +10,8 @@ use winreg::{
910
};
1011

1112
/// Support testing of code that mutates global state
12-
pub fn with_saved_global_state<S>(
13+
#[cfg(windows)]
14+
fn with_saved_global_state<S>(
1315
getter: impl Fn() -> io::Result<S>,
1416
setter: impl Fn(S),
1517
f: &mut dyn FnMut(),

src/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use std::process::Command;
1515
#[cfg(test)]
1616
use anyhow::Result;
1717

18-
pub use crate::cli::self_update::test::{with_saved_global_state, with_saved_path};
18+
pub use crate::cli::self_update::test::with_saved_path;
1919
use crate::currentprocess::TestProcess;
2020
use crate::dist::TargetTriple;
2121

0 commit comments

Comments
 (0)