Skip to content
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

api: Reduce allocations in get_user_list #60

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

GodTamIt
Copy link
Contributor

This change cleans up some references vs. ownership usage to reduce the amount of unneeded allocation done in the query building.

This change cleans up some references vs. ownership usage to
reduce the amount of unneeded allocation done in the query
building.
@GodTamIt
Copy link
Contributor Author

N.B.: taking an impl IntoIterator<Item = &str> instead of Vec<String> for fields may be a better API surface for users who may not always have ownership and/or want to clone. Especially since we don't really need a String or the Vec itself

@DarrenBaldwin07
Copy link
Owner

N.B.: taking an impl IntoIterator<Item = &str> instead of Vec<String> for fields may be a better API surface for users who may not always have ownership and/or want to clone. Especially since we don't really need a String or the Vec itself

I agree with this. Since everything in /models and /api is generated from openapi spec, the code is pretty mediocre.

@DarrenBaldwin07 DarrenBaldwin07 self-requested a review August 2, 2024 00:13
@DarrenBaldwin07 DarrenBaldwin07 merged commit 7690436 into DarrenBaldwin07:main Aug 2, 2024
1 check passed
@GodTamIt GodTamIt deleted the user-api-cleanup branch August 5, 2024 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants