-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix destructuring async props (#419)
* Add failing trybuild test Adds a test for destructed struct pattern using an async component that is currently failing just like in #410. * Fix destructuring props in async components This change fixes `#[component]` proc macro generation to support the struct destructured pattern. This was different than non-async structs as async structs are converted into non-async structs. * Remove map and unwrap early We can unwrap so avoid the nesting with map and just unwrap immediately and perform the match on the prop argument. * Remove incorrect comment regarding sync args * Improve test to include generic and lifetimes Replace the simple destructuring test with the more complicated one to show that destructuring works even with lifetimes and generics included. * Fix async component test Makes the `AsyncComponentWithPropDestructuring` function actually async..
- Loading branch information
mc1098
authored
May 10, 2022
1 parent
49135bd
commit ffa26f7
Showing
2 changed files
with
130 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters