Skip to content

Save string allocation on prefix commands using non-default prefix#120

Merged
GnomedDev merged 2 commits into
Discord-TTS:masterfrom
jamesbt365:prefix-allocation
Aug 19, 2025
Merged

Save string allocation on prefix commands using non-default prefix#120
GnomedDev merged 2 commits into
Discord-TTS:masterfrom
jamesbt365:prefix-allocation

Conversation

@jamesbt365
Copy link
Copy Markdown
Contributor

begone Cow::Owned(String::from(prefix))

Copy link
Copy Markdown
Member

@GnomedDev GnomedDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be using strip_prefix().is_some() or is this better served by starts_with?

@jamesbt365
Copy link
Copy Markdown
Contributor Author

Yeah you're right, i think i was originally gonna use the value but then realized i didn't need to, then just didn't clock that starts_with existed

@jamesbt365 jamesbt365 requested a review from GnomedDev August 18, 2025 23:45
@GnomedDev GnomedDev merged commit 08cd0a9 into Discord-TTS:master Aug 19, 2025
@jamesbt365 jamesbt365 deleted the prefix-allocation branch August 19, 2025 19:10
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