From 16a7e49fbf28083893440203a8db233c0a179c8a Mon Sep 17 00:00:00 2001 From: Lucas Vas Date: Wed, 3 Sep 2025 11:50:10 -0400 Subject: [PATCH] chore: update documentation comments to match implemented code --- macros/src/lib.rs | 4 ++-- traits/src/reactive.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/macros/src/lib.rs b/macros/src/lib.rs index 6ddf59e..08dbc4d 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -61,12 +61,12 @@ use syn::{parse_macro_input, Data, Ident}; /// ``` /// let user: User = User::new(); /// let user_reactive: UserReactive = user.as_reactive(); -/// let custom_reactive: CustomTypeReactive = user_reactive.custom.as_reactive(); +/// let custom_reactive: CustomTypeReactive = user_reactive.custom.get().as_reactive(); /// // And then convert back... /// user_reactive.custom.set(custom_reactive.capture()); /// ``` /// If a shorthand for the `capture` and `as_reactive` functions are absolutely *required*, then this -/// macro is probably not the way to go - as of now, this functionality should be impmlemented manually. +/// macro is probably not the way to go - as of now, this functionality should be implemented manually. #[proc_macro_derive(Reactive)] pub fn make_reactive(input: TokenStream) -> TokenStream { let input = parse_macro_input!(input as syn::DeriveInput); diff --git a/traits/src/reactive.rs b/traits/src/reactive.rs index d3b63c5..40cb7d1 100644 --- a/traits/src/reactive.rs +++ b/traits/src/reactive.rs @@ -65,7 +65,7 @@ pub trait AsReactive { /// /// impl ReactiveCapture for UserReactive { /// type CaptureType = User; -/// fn capture(self) -> User { +/// fn capture(&self) -> User { /// User { /// id: self.id.get(), /// name: self.name.get()