Skip to content

Commit

Permalink
rustfmt nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
cecton committed Nov 1, 2023
1 parent b5199be commit fd79b58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/yew-macro/src/autoprops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl syn::parse::Parse for Autoprops {
syn::Error::new_spanned(
sig,
"could not find #[function_component] attribute in function declaration \
(#[autoprops] must be place *before* #[function_component])",
(#[autoprops] must be place *before* #[function_component])",
)
})?;

Expand Down
8 changes: 4 additions & 4 deletions packages/yew-macro/src/function_component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ impl Parse for FunctionComponent {
}
ty => {
let msg = format!(
"expected a reference to a `Properties` type \
(try: `&{}` or use #[autoprops])",
"expected a reference to a `Properties` type (try: `&{}` or use \
#[autoprops])",
ty.to_token_stream()
);
return Err(syn::Error::new_spanned(ty, msg));
Expand All @@ -160,8 +160,8 @@ impl Parse for FunctionComponent {
let params: TokenStream = inputs.map(|it| it.to_token_stream()).collect();
return Err(syn::Error::new_spanned(
params,
"function components can accept at most one parameter for the props, \
maybe you wanted to use #[autoprops]?",
"function components can accept at most one parameter for the props, maybe you \
wanted to use #[autoprops]?",
));
}

Expand Down

0 comments on commit fd79b58

Please sign in to comment.