Add FromRequestParts derive macro#336
Conversation
Codecov ReportAttention: Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
seqre
left a comment
There was a problem hiding this comment.
Thank you for your contribution! That's a great start, but I think it can be a bit better.
CI is failing due to a removed Clippy lint (match_on_vec_items) in cot/src/utils/graph.rs, which I haven’t modified. Should I remove the #[expect(clippy::match_on_vec_items)] line, or would you prefer to handle it separately?
Regarding your comment from the issue, I've checked the clippy workflow logs and I see no such lint error.
Also, please consider installing pre-commit hook, so your code is automatically formatted!
m4tx
left a comment
There was a problem hiding this comment.
Hey, thanks for the contribution! This looks fairly good; please have a look at my comments for some outstanding issues before we'll be ready to merge.
Also, I think it would be useful to use the macro on some existing code, for instance, here:
Lines 58 to 71 in f9d7c43
Hi, thank you for taking the time to review and provide valuable feedbacks. I will work on the issues as per your guidelines. This is my first time contributing on a project so please mind my messiness. |
|
@m4tx Hi, I am having some issue with module exports, can I push the code so you can take a look. |
Sure! |
|
@m4tx Hi, did you get the time to look at the code for what I am doing wrong? |
|
@m4tx i made some changes and ran tests, all passed. |
Please have a look at the pipelines, the tests are failing because you're trying to use I'm not sure how you are running the tests, but running |
|
@m4tx should pass now |
I don't know why it was not picking up the errors then I ran cargo +nightly nextest run -p cot_macros --all-features -- derive_from_struct and was able to find the issues. |
|
@m4tx added more tests, should cover required patch coverage. |
|
@m4tx how can I test the coverage locally so I only push the changes when I am certain it will be above the required. |
@kumarUjjawal, first, generate the coverage data: cargo llvm-cov --all-features --workspace --branch --doctests --codecov --output-path codecov.json -- --include-ignoredThen, you can use |
|
@seqre thank you! |
|
@seqre @kumarUjjawal FYI there's a Lines 41 to 44 in c7e295f It also opens the coverage viewer in a web browser automatically. |
|
@m4tx All checks are passing now, let me know if there’s anything else you'd like me to do. |
|
@kumarUjjawal, I think there are still some leftover review comments. Please review all and either resolve them if done or apply the suggested solutions. |
Thank you! I've just one review changes left to test. I'm working on that. |
|
@m4tx thank you for your help. I hope to contribute more to this project. |

adds the
FromRequestPartsderive macro implementation.Closes #316