From 074935e4251a79e6f48d4cfabc08467db1673b1d Mon Sep 17 00:00:00 2001 From: Filipe Rodrigues Date: Mon, 4 Mar 2024 20:54:55 +0000 Subject: [PATCH] Renamed `SignalGetInner` to `SignalGetCopy` and made it public. --- dynatos-reactive/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dynatos-reactive/src/lib.rs b/dynatos-reactive/src/lib.rs index 30c22ff..6cf5cc0 100644 --- a/dynatos-reactive/src/lib.rs +++ b/dynatos-reactive/src/lib.rs @@ -23,16 +23,16 @@ pub use self::{ use std::marker::Unsize; /// Types which may be copied by [`SignalGet`] -trait SignalGetInner: Sized { +pub trait SignalGetCopy: Sized { fn copy(self) -> T; } -impl SignalGetInner for &'_ T { +impl SignalGetCopy for &'_ T { fn copy(self) -> T { *self } } -impl SignalGetInner> for Option<&'_ T> { +impl SignalGetCopy> for Option<&'_ T> { fn copy(self) -> Option { self.copied() } @@ -47,7 +47,7 @@ pub trait SignalGet { impl SignalGet for S where S: SignalWith, - for<'a> S::Value<'a>: SignalGetInner, + for<'a> S::Value<'a>: SignalGetCopy, { fn get(&self) -> T { self.with(|value| value.copy())