From 2e31177f625fab4ae69e56ab4412b0ac3243c9aa Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Fri, 31 May 2024 12:20:21 -0400 Subject: [PATCH] remove signal function call Read implementations (dead code) --- reactive_graph/src/nightly.rs | 78 +---------------------------------- 1 file changed, 1 insertion(+), 77 deletions(-) diff --git a/reactive_graph/src/nightly.rs b/reactive_graph/src/nightly.rs index c516ec9a6..a92393f71 100644 --- a/reactive_graph/src/nightly.rs +++ b/reactive_graph/src/nightly.rs @@ -4,51 +4,13 @@ use crate::{ ArcReadSignal, ArcRwSignal, ArcWriteSignal, ReadSignal, RwSignal, WriteSignal, }, - traits::{Get, Read, Set}, + traits::{Get, Set}, wrappers::{ read::{ArcSignal, Signal}, write::SignalSetter, }, }; -macro_rules! impl_get_fn_traits_read { - ($($ty:ident $(($method_name:ident))?),*) => { - $( - #[cfg(feature = "nightly")] - impl FnOnce<()> for $ty { - type Output = ::Value; - - #[inline(always)] - extern "rust-call" fn call_once(self, _args: ()) -> Self::Output { - impl_get_fn_traits_read!(@method_name self $($method_name)?) - } - } - - #[cfg(feature = "nightly")] - impl FnMut<()> for $ty { - #[inline(always)] - extern "rust-call" fn call_mut(&mut self, _args: ()) -> Self::Output { - impl_get_fn_traits_read!(@method_name self $($method_name)?) - } - } - - #[cfg(feature = "nightly")] - impl Fn<()> for $ty { - #[inline(always)] - extern "rust-call" fn call(&self, _args: ()) -> Self::Output { - impl_get_fn_traits_read!(@method_name self $($method_name)?) - } - } - )* - }; - (@method_name $self:ident) => { - $self.read() - }; - (@method_name $self:ident $ident:ident) => { - $self.$ident() - }; -} - macro_rules! impl_set_fn_traits { ($($ty:ident $($method_name:ident)?),*) => { $( @@ -87,44 +49,6 @@ macro_rules! impl_set_fn_traits { }; } -macro_rules! impl_get_fn_traits_read_send { - ($($ty:ident $(($method_name:ident))?),*) => { - $( - #[cfg(feature = "nightly")] - impl FnOnce<()> for $ty { - type Output = ::Value; - - #[inline(always)] - extern "rust-call" fn call_once(self, _args: ()) -> Self::Output { - impl_get_fn_traits_read_send!(@method_name self $($method_name)?) - } - } - - #[cfg(feature = "nightly")] - impl FnMut<()> for $ty { - #[inline(always)] - extern "rust-call" fn call_mut(&mut self, _args: ()) -> Self::Output { - impl_get_fn_traits_read_send!(@method_name self $($method_name)?) - } - } - - #[cfg(feature = "nightly")] - impl Fn<()> for $ty { - #[inline(always)] - extern "rust-call" fn call(&self, _args: ()) -> Self::Output { - impl_get_fn_traits_read_send!(@method_name self $($method_name)?) - } - } - )* - }; - (@method_name $self:ident) => { - $self.read() - }; - (@method_name $self:ident $ident:ident) => { - $self.$ident() - }; -} - macro_rules! impl_get_fn_traits_get { ($($ty:ident $(($method_name:ident))?),*) => { $(