diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-08-22 12:14:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-22 12:14:59 -0400 |
commit | 7a1a082876298a4c9e37237074ea62942180d083 (patch) | |
tree | 690b46889987a9f576a1b0601a322141b51b0660 /test_util/src | |
parent | c66386dbd20b735161017a239c6af013da1f1718 (diff) |
perf: cache swc dependency analysis and don't hold onto `ParsedSource`s in memory (#15502)
Diffstat (limited to 'test_util/src')
-rw-r--r-- | test_util/src/pty.rs | 7 |
1 files changed, 4 insertions, 3 deletions
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); } |