-
-
Notifications
You must be signed in to change notification settings - Fork 261
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
Make keyword and builtin sets static #554
Make keyword and builtin sets static #554
Conversation
05247d3
to
20fba3f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm positive on this change, but I'd prefer to use once_cell::Lazy
to lazy_static.
Sure! Never heard of that one but looks relatively similar so switching over should be easy enough. |
No need to initialize the keyword and builtin sets inline and then pass them around manually. Instead, define them as static (using the lazy_static library) and reference them "globally".
20fba3f
to
26156a4
Compare
(it'd be interesting to make these maps a static phf map instead, but future work.) I'd be happy to merge this with lints fixed. |
The change to |
Pretty much yeah, the once-cell API is on track to be std-available eventually. |
Merging #555 led to a merge conflict; r=me after that's fixed |
Head branch was pushed to by a user without write access
I am frustrated that this doesn't show up locally
For some reason, running |
Okay, figured it out. These warnings don't happen in the latest version of Rust + Clippy, but Pest uses 1.56.1, from last October. If this is something worth updating, I can do that. |
I bet I know what it is: the CI clippy is We definitely could use some restructuring of our CI pipeline to separate the MSRV checks from the clippy/fmt checks. See also #655. |
No need to initialize the keyword and builtin sets inline and then pass them around manually. Instead, define them as static (using the
lazy_static libraryonce_cell library) and reference them "globally".