From 19773d26615ad1af2a4b3eccc73d6af1c0e0d0db Mon Sep 17 00:00:00 2001 From: Noah Date: Tue, 12 Dec 2023 00:48:57 -0800 Subject: [PATCH] Rename Dispatch::cx -> Dispatch::context --- crates/yewdux-input/src/lib.rs | 2 +- crates/yewdux/src/dispatch.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/yewdux-input/src/lib.rs b/crates/yewdux-input/src/lib.rs index 5641619..bd26058 100644 --- a/crates/yewdux-input/src/lib.rs +++ b/crates/yewdux-input/src/lib.rs @@ -83,7 +83,7 @@ pub trait InputDispatch { impl InputDispatch for Dispatch { fn context(&self) -> &Context { - self.cx() + self.context() } } diff --git a/crates/yewdux/src/dispatch.rs b/crates/yewdux/src/dispatch.rs index 0d8b33c..8601966 100644 --- a/crates/yewdux/src/dispatch.rs +++ b/crates/yewdux/src/dispatch.rs @@ -53,7 +53,7 @@ impl Default for Dispatch { impl Dispatch { /// Create a new dispatch with the global context (thread local). /// - /// This is only available for wasm32 targets. For SSR, see the YewduxRoot pattern. + /// This is only available for wasm. For SSR, see the YewduxRoot pattern. #[cfg(target_arch = "wasm32")] pub fn global() -> Self { Self::new(&Context::global()) @@ -68,7 +68,7 @@ impl Dispatch { } /// Get the context used by this dispatch. - pub fn cx(&self) -> &Context { + pub fn context(&self) -> &Context { &self.cx }