From 7a1a082876298a4c9e37237074ea62942180d083 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 22 Aug 2022 12:14:59 -0400 Subject: perf: cache swc dependency analysis and don't hold onto `ParsedSource`s in memory (#15502) --- test_util/src/pty.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test_util/src') diff --git a/test_util/src/pty.rs b/test_util/src/pty.rs index f69fc8b31..83a27926b 100644 --- a/test_util/src/pty.rs +++ b/test_util/src/pty.rs @@ -82,7 +82,7 @@ pub fn create_pty( let pty = windows::WinPseudoConsole::new( program, args, - &cwd.as_ref().to_string_lossy().to_string(), + &cwd.as_ref().to_string_lossy(), env_vars, ); Box::new(pty) @@ -338,14 +338,15 @@ mod windows { } } + // SAFETY: These handles are ok to send across threads. unsafe impl Send for WinHandle {} + // SAFETY: These handles are ok to send across threads. unsafe impl Sync for WinHandle {} impl Drop for WinHandle { fn drop(&mut self) { if !self.inner.is_null() && self.inner != INVALID_HANDLE_VALUE { - // SAFETY: - // winapi call + // SAFETY: winapi call unsafe { winapi::um::handleapi::CloseHandle(self.inner); } -- cgit v1.2.3