chinedufn / percy

Build frontend browser apps with Rust + WebAssembly. Supports server side rendering.
https://chinedufn.github.io/percy/
Apache License 2.0
2.26k stars 84 forks source link

Variables captured by event closures wrongfully seen as unused #92

Open cryptoquick opened 5 years ago

cryptoquick commented 5 years ago

I love the percy html macro, it's super clean and easy to use, but the only problem I have with it is that any closures within it, and even their use, gets called out by RLS and even rustc thinking they're not used in the project. It's like there's some sort of typing "any" in place.

The HTML also lacks a means of formatting, like Prettier does with JSX, but that's a different story.

This is not a super high priority, but I figured I'd make an issue to track it, since I'm curious what others are doing about the issue, perhaps using unit tests.

chinedufn commented 5 years ago

Thanks for opening this! I've slightly tweaked the name - so let me know if I'm off on that front!

WRT the problem - I've run into this myself but haven't quite taken a look at why yet.

Thanks for opening an issue for this!

cryptoquick commented 5 years ago

Good assessment. I appreciate the refinement of the terminology.