diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml index c41968db5..5673ba5a9 100644 --- a/crates/core/Cargo.toml +++ b/crates/core/Cargo.toml @@ -12,7 +12,7 @@ license = "MIT OR Apache-2.0" edition = "2018" [dependencies] -anymap = "0.12" +anymap2 = "0.13" itertools = "0.10.0" num-traits = "0.2" pest = "2.0" diff --git a/crates/core/src/runtime/runtime.rs b/crates/core/src/runtime/runtime.rs index c3ea02bde..4248c11a0 100644 --- a/crates/core/src/runtime/runtime.rs +++ b/crates/core/src/runtime/runtime.rs @@ -281,7 +281,7 @@ impl<'g> Default for RuntimeCore<'g> { /// Unnamed state for plugins during rendering pub struct Registers { - registers: std::cell::RefCell, + registers: std::cell::RefCell, } impl Registers { @@ -289,9 +289,7 @@ impl Registers { /// /// If a plugin needs state, it creates a `struct Register : Default` and accesses it via /// `get_mut`. - pub fn get_mut + Default>( - &self, - ) -> std::cell::RefMut<'_, T> { + pub fn get_mut(&self) -> std::cell::RefMut<'_, T> { std::cell::RefMut::map(self.registers.borrow_mut(), |registers| { registers.entry::().or_insert_with(Default::default) }) @@ -301,7 +299,7 @@ impl Registers { impl Default for Registers { fn default() -> Self { Self { - registers: std::cell::RefCell::new(anymap::AnyMap::new()), + registers: std::cell::RefCell::new(anymap2::AnyMap::new()), } } }