Kindness-Works / rocket-ts

Generate types directly from Rocket request handlers
MIT License
2 stars 1 forks source link

Omit Custom Request Guards #5

Closed AvaterClasher closed 7 months ago

AvaterClasher commented 7 months ago

Nothing fancy just storing the req guards in a vector and comparing the types against it. If we don't get a exclude type we return a empty vec so that the compiler doesnt panic.

In the base folder -> create exclusion.txt || exclusion.toml anything really.

cargo run generate -i example-handlers -o k7.ts -e exclusion.toml

closes #3

dteare commented 7 months ago

I don't see how the exclusion list could be a toml file. Afaict from the parsing code you're expecting a file of new-line separated strings.

AvaterClasher commented 7 months ago

Hey @dteare,

I've addressed all of the Clippy warnings now. Regarding the error messages, I've included the filename along with the error. I plan to remove the eprintln! macro once I integrate the logging framework later on.

Could you please provide your suggestions for the README.md? Specifically, I'm thinking about the example section. Should I remove the upper part of it, or would you recommend it staying?

Thank you.

dteare commented 7 months ago

Some nice updates here. Thanks for continuing your work here @AvaterClasher. Closing in favour of PR #6, which includes all your commits with my edits applied on top.