Skip to content

Static regex#3

Open
ironhaven wants to merge 2 commits intoCarrigan:masterfrom
ironhaven:static-regex
Open

Static regex#3
ironhaven wants to merge 2 commits intoCarrigan:masterfrom
ironhaven:static-regex

Conversation

@ironhaven
Copy link

In the current code you compile the prefix regex for every discord message. It compiles two regexes for each command issues to the bot. This pull uses the lazy_static crate so each regex will only be compiled when it is first used.

In I addition ran cargo fmt to format the code to the community standard. Is this too much for the pull?
You should also run cargo clippy to see some quick improvement you could make.

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.

1 participant

Comments