Skip to content

Commit efdffbd

Browse files
committed
Move from anymap to anymap3
This avoids a future incompatibility issue. #202 rust-lang/rust#127323
1 parent 16c6c58 commit efdffbd

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

Cargo.lock

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ docs = []
7676
nih_plug_derive = { path = "nih_plug_derive" }
7777

7878
anyhow = "1.0"
79-
anymap = "1.0.0-beta.2"
79+
anymap3 = "1.0.1"
8080
atomic_float = "0.1"
8181
atomic_refcell = "0.1"
8282
backtrace = "0.3.65"

src/event_loop/background_thread.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//!
44
//! This is essentially a slimmed down version of the `LinuxEventLoop`.
55
6-
use anymap::Entry;
6+
use anymap3::Entry;
77
use crossbeam::channel;
88
use parking_lot::Mutex;
99
use std::sync::{Arc, LazyLock, Weak};
@@ -71,10 +71,10 @@ where
7171
}
7272

7373
// Rust does not allow us to use the `T` and `E` type variable in statics, so this is a
74-
// workaround to have a singleton that also works if for whatever reason there arem ultiple `T`
75-
// and `E`s in a single process (won't happen with normal plugin usage, but sho knwos).
76-
static HANDLE_MAP: LazyLock<Mutex<anymap::Map<dyn std::any::Any + Send>>> =
77-
LazyLock::new(|| Mutex::new(anymap::Map::new()));
74+
// workaround to have a singleton that also works if for whatever reason there are multiple `T`
75+
// and `E`s in a single process (won't happen with normal plugin usage, but who knows).
76+
static HANDLE_MAP: LazyLock<Mutex<anymap3::Map<dyn std::any::Any + Send>>> =
77+
LazyLock::new(|| Mutex::new(anymap3::Map::new()));
7878

7979
impl<T: Send + 'static, E: MainThreadExecutor<T> + 'static> WorkerThread<T, E> {
8080
fn spawn() -> Self {

0 commit comments

Comments
 (0)