Fix is_valid on Windows (#1217)

* git add -u

* fix cfg

* pub

---------

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
This commit is contained in:
Dongjia "toka" Zhang 2023-04-18 12:15:47 +02:00 committed by GitHub
parent 96e24d1c8b
commit fc23782dc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -474,13 +474,8 @@ impl InProcessExecutorHandlerData {
r
}
#[cfg(all(windows, feature = "std"))]
pub(crate) fn is_valid(&self) -> bool {
self.in_target == 1
}
#[cfg(unix)]
pub(crate) fn is_valid(&self) -> bool {
#[cfg(any(unix, feature = "std"))]
pub fn is_valid(&self) -> bool {
!self.current_input_ptr.is_null()
}