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

Take prefix as Cow<'static, str> #242

Merged
merged 1 commit into from
Jan 30, 2024
Merged

Conversation

GnomedDev
Copy link
Member

No description provided.

@kangalio
Copy link
Collaborator

This is admittedly a tiny amount of churn, but for an even more minuscule amount of resource saving...

@GnomedDev
Copy link
Member Author

Small incremental changes are how we improve. This has bugged me for absolutely ages though

@kangalio
Copy link
Collaborator

Alright. I personally feel that the type used for the prefix is so negligible for performance (prefix is static, and dynamic_prefix is only convenience for the purer stripped_dynamic_prefix), that the decision should be purely based on usability. And Rust's default go-to string type for everything that's not specialized is just String, hence to me String does feel cleaner than Cow<'static, str> here. But I don't really feel like bickering about this because I suppose in the end it's a small change

@GnomedDev GnomedDev merged commit 25a61c9 into serenity-rs:next Jan 30, 2024
12 checks passed
@GnomedDev GnomedDev deleted the cow-prefix branch January 30, 2024 12:26
GnomedDev added a commit that referenced this pull request Apr 11, 2024
GnomedDev added a commit to GnomedDev/poise that referenced this pull request Apr 14, 2024
GnomedDev added a commit to NotNorom/poise that referenced this pull request May 3, 2024
GnomedDev added a commit that referenced this pull request May 23, 2024
GnomedDev added a commit that referenced this pull request May 23, 2024
tazz4843 pushed a commit to tazz4843/poise that referenced this pull request Jun 9, 2024
GnomedDev added a commit that referenced this pull request Oct 19, 2024
GnomedDev added a commit that referenced this pull request Nov 13, 2024
GnomedDev added a commit that referenced this pull request Nov 13, 2024
GnomedDev added a commit that referenced this pull request Nov 15, 2024
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