Skip to content

Commit

Permalink
docs(perseus-macro): readability fixups (#194)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Russell <git@ryanrussell.org>

Signed-off-by: Ryan Russell <git@ryanrussell.org>
  • Loading branch information
ryanrussell authored Sep 26, 2022
1 parent 2309c5c commit f74b400
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions packages/perseus-macro/src/entrypoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl Parse for MainFn {
}
item => Err(syn::Error::new_spanned(
item,
"only funtions can be used as entrypoints",
"only functions can be used as entrypoints",
)),
}
}
Expand Down Expand Up @@ -152,7 +152,7 @@ impl Parse for EngineMainFn {
}
item => Err(syn::Error::new_spanned(
item,
"only funtions can be used as entrypoints",
"only functions can be used as entrypoints",
)),
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/perseus-macro/src/head.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl Parse for HeadFn {
}
item => Err(syn::Error::new_spanned(
item,
"only funtions can be used as head functions",
"only functions can be used as head functions",
)),
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/perseus-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ pub fn engine_main(_args: TokenStream, input: TokenStream) -> TokenStream {
/// wrapped in a `Signal`, but you can also enable nested fine-grained
/// reactivity by adding the `#[rx::nested("field_name", FieldTypeRx)]` helper
/// attribute to the `struct` (not the field, that isn't supported by Rust yet),
/// where `field_name` is the name of the field you want to use ensted
/// where `field_name` is the name of the field you want to use instead
/// reactivity on, and `FieldTypeRx` is the wrapper type that will be expected.
/// This should be created by using this macro on the original `struct` type.
///
Expand Down
4 changes: 2 additions & 2 deletions packages/perseus-macro/src/rx_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub fn make_rx_impl(mut orig_struct: ItemStruct, name_raw: Ident) -> TokenStream
mid_struct.ident = mid_name.clone();
// Look through the attributes for any that warn about nested fields
// These can't exist on the fields themselves because they'd be parsed before
// this macro, and tehy're technically invalid syntax (grr.) When we come
// this macro, and they're technically invalid syntax (grr.) When we come
// across these fields, we'll run `.make_rx()` on them instead of naively
// wrapping them in an `RcSignal`
let nested_fields = mid_struct
Expand Down Expand Up @@ -154,7 +154,7 @@ pub fn make_rx_impl(mut orig_struct: ItemStruct, name_raw: Ident) -> TokenStream
let wrapper_ty = nested_fields_map.get(field.ident.as_ref().unwrap());
field.ty = if let Some(wrapper_ty) = wrapper_ty {
// If we don't make this a reference, nested properties have to be cloned (not
// nice for ergonomics) TODO Chekc back on this, could bite
// nice for ergonomics) TODO Check back on this, could bite
// back!
syn::Type::Verbatim(quote!(&'rx #wrapper_ty<'rx>))
} else {
Expand Down
4 changes: 2 additions & 2 deletions packages/perseus-macro/src/state_fns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub struct StateFn {
/// The body of the function.
pub block: Box<Block>,
/// The arguments that the function takes. We don't need to modify these
/// because we wrap them with a functin that does serializing/
/// because we wrap them with a function that does serializing/
/// deserializing.
pub args: Punctuated<FnArg, Comma>,
/// The visibility of the function.
Expand Down Expand Up @@ -77,7 +77,7 @@ impl Parse for StateFn {
}
item => Err(syn::Error::new_spanned(
item,
"only funtions can be used as tests",
"only functions can be used as tests",
)),
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/perseus-macro/src/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl Parse for TemplateFn {
}
item => Err(syn::Error::new_spanned(
item,
"only funtions can be used as templates",
"only functions can be used as templates",
)),
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/perseus-macro/src/template_rx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl Parse for TemplateFn {
}
item => Err(syn::Error::new_spanned(
item,
"only funtions can be used as templates",
"only functions can be used as templates",
)),
}
}
Expand Down Expand Up @@ -168,7 +168,7 @@ pub fn template_impl(input: TemplateFn) -> TokenStream {
};
let name_string = name.to_string();
// Handle the case in which the template is just using global state and the
// first argument is the unit type That's represented for Syn as a typle
// first argument is the unit type That's represented for Syn as a tuple
// with no elements
match rx_props_ty {
// This template takes dummy state and global state
Expand Down
2 changes: 1 addition & 1 deletion packages/perseus-macro/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl Parse for TestFn {
}
item => Err(syn::Error::new_spanned(
item,
"only funtions can be used as tests",
"only functions can be used as tests",
)),
}
}
Expand Down

0 comments on commit f74b400

Please sign in to comment.