Closed ccbrown closed 2 weeks ago
Adds support for generic type and const parameters for the component macro.
#[derive(Props)] struct MyGenericProps<T, const U: usize> { foo: [T; U], } #[component] fn MyComponentWithGenericProps<T: 'static, const U: usize>( _props: &mut MyGenericProps<T, U>, ) -> impl Into<AnyElement<'static>> { element!(Box) } #[component] fn MyComponentWithGenericPropsWhereClause<T, const U: usize>( _props: &mut MyGenericProps<T, U>, ) -> impl Into<AnyElement<'static>> where T: 'static, { element!(Box) }
https://github.com/ccbrown/iocraft/issues/32
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 91.14%. Comparing base (e412e99) to head (5a90fc3). Report is 1 commits behind head on main.
e412e99
5a90fc3
What It Does
Adds support for generic type and const parameters for the component macro.
Related Issues
https://github.com/ccbrown/iocraft/issues/32