Closed kirillsemyonkin closed 10 months ago
Imagine a component like so:
#[autoprops_component] pub fn Example<T: 'static>() -> Html { html! {} }
As T is not used, Rust complains:
T
parameter `T` is never used consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
Properties
At least, currently solvable with following code:
#[autoprops_component] pub fn Example<T: 'static>(#[prop_or_default] _never: &PhantomData<T>) -> Html { html! {} }
Fixed in my port of yew-autoprops to Yew
Imagine a component like so:
As
T
is not used, Rust complains:Properties
(generic) struct still generated despite having no props?At least, currently solvable with following code: