-
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use impl Into for where and setparams, create functions #402
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I don't have time to review this just yet, but I will say that a lot of PCR's design decisions revolve around function arguments having discrete types rather than generics. This is done so that I can reliably make function return types generic, which I think is more beneficial.
If you're borrowing a string ( |
I know that it will clone anyways, the point is that the API allows you to borrow it. Tuple struct only containing one type would also be useful, you can just pass it directly (or borrow it), without cluttering the function call with |
keep up to date
I skipped using impl Into<...> for any generic types because that would just not work |
@Brendonovich I believe this PR should be ready to merge, I removed impl Into's for the query params as they would conflict. Could you please review this pr? |
keep up to date
In in two minds about this: |
Personally, I prefer a good DX, and impl Into's remove a lot of boilerplate. If you disagree, I'll probably just keep my repo synced with your master and use that in cargo. |
Helpful for when you have a custom type wrapping an i32, for example. You can also borrow strings from structs (no cloning). etc.