Skip to content

Commit

Permalink
Remove unnecessary unit when no props are provided
Browse files Browse the repository at this point in the history
  • Loading branch information
cecton committed Nov 1, 2023
1 parent fd79b58 commit df251e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/yew-macro/src/autoprops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl Autoprops {
let fn_name = &sig.ident;
let (impl_generics, type_generics, where_clause) = sig.generics.split_for_impl();
let inputs = if sig.inputs.is_empty() {
quote! { (): &() }
quote! {}
} else {
// NOTE: function components currently don't accept receivers, we're just passing the
// information to the next macro to fail and give its own error message
Expand Down

0 comments on commit df251e3

Please sign in to comment.