From e9815315566e98353516e80c33e245702c208fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garci=CC=81a?= Date: Mon, 20 Jan 2025 15:20:31 +0100 Subject: [PATCH 1/2] Update `ipc-channel` and `windows-sys` crates --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 362ddfe..dbcda90 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ json = ["serde_json"] safe-shared-libraries = ["findshlibs"] [dependencies] -ipc-channel = "0.18.2" +ipc-channel = "0.19.0" serde = { version = "1.0.104", features = ["derive"] } backtrace = { version = "0.3.73", optional = true, features = ["serde"] } libc = "0.2.66" @@ -35,7 +35,7 @@ findshlibs = { version = "0.10.2", optional = true } small_ctor = { version = "0.1.2", optional = true } [target."cfg(windows)".dependencies] -windows-sys = { version = "0.48.0", features = ["Win32_System_Threading"] } +windows-sys = { version = "0.59.0", features = ["Win32_Foundation", "Win32_System_Threading"] } [[example]] name = "panic" From 1fd62dbcceda21ed355729f3baf519ee55753b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garci=CC=81a?= Date: Mon, 20 Jan 2025 15:24:28 +0100 Subject: [PATCH 2/2] Fix lints --- src/lib.rs | 3 --- src/panic.rs | 2 ++ src/serde.rs | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 77b2920..874ce62 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -195,6 +195,3 @@ pub use self::core::{assert_spawn_is_safe, init, ProcConfig}; pub use self::error::{Location, PanicInfo, SpawnError}; pub use self::pool::{Pool, PoolBuilder}; pub use self::proc::{spawn, Builder, JoinHandle}; - -#[cfg(feature = "async")] -pub use self::asyncsupport::{spawn_async, AsyncJoinHandle}; diff --git a/src/panic.rs b/src/panic.rs index de4e71e..d8a0e68 100644 --- a/src/panic.rs +++ b/src/panic.rs @@ -29,6 +29,8 @@ pub fn take_panic(panic: &dyn Any) -> PanicInfo { .unwrap_or_else(move || serialize_panic(panic)) } +// PanicInfo is replaced by PanicHookInfo in 1.81 and deprecated in 1.82, but MSRV is 1.70 +#[allow(deprecated)] pub fn panic_handler(info: &panic::PanicInfo<'_>, capture_backtraces: BacktraceCapture) { PANIC_INFO.with(|pi| { #[allow(unused_mut)] diff --git a/src/serde.rs b/src/serde.rs index 5373e4f..4f85c48 100644 --- a/src/serde.rs +++ b/src/serde.rs @@ -61,7 +61,7 @@ impl fmt::Debug for Shmem { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { struct ByteRepr<'a>(&'a Shmem); - impl<'a> fmt::Debug for ByteRepr<'a> { + impl fmt::Debug for ByteRepr<'_> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "b\"")?; for &byte in self.0.as_bytes() {