chore: update documentation comments to match implemented code

This commit is contained in:
alphafetus committed 2025-09-03 11:50:10 -04:00
1 parent 6eacb08e58
commit 16a7e49fbf
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -61,12 +61,12 @@ use syn::{parse_macro_input, Data, Ident};
/// ``` /// ```
/// let user: User = User::new(); /// let user: User = User::new();
/// let user_reactive: UserReactive = user.as_reactive(); /// 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... /// // And then convert back...
/// user_reactive.custom.set(custom_reactive.capture()); /// user_reactive.custom.set(custom_reactive.capture());
/// ``` /// ```
/// If a shorthand for the `capture` and `as_reactive` functions are absolutely *required*, then this /// 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)] #[proc_macro_derive(Reactive)]
pub fn make_reactive(input: TokenStream) -> TokenStream { pub fn make_reactive(input: TokenStream) -> TokenStream {
let input = parse_macro_input!(input as syn::DeriveInput); let input = parse_macro_input!(input as syn::DeriveInput);
+1 -1
View File
@@ -65,7 +65,7 @@ pub trait AsReactive {
/// ///
/// impl ReactiveCapture for UserReactive { /// impl ReactiveCapture for UserReactive {
/// type CaptureType = User; /// type CaptureType = User;
/// fn capture(self) -> User { /// fn capture(&self) -> User {
/// User { /// User {
/// id: self.id.get(), /// id: self.id.get(),
/// name: self.name.get() /// name: self.name.get()