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

Use once_cell instead of lazy_static #324

Merged
merged 1 commit into from Nov 16, 2021
Merged

Conversation

sigmaSd
Copy link
Contributor

@sigmaSd sigmaSd commented Nov 16, 2021

The motivation is that console already uses once_cell, so this should in theory decrease the total number of dependencies.

Note: The formatting has changed, do you happen to use some rustfmt flags? if so it would be better if you have a .rustfmt.toml file.

@djc djc merged commit c43d7b3 into console-rs:main Nov 16, 2021
@djc
Copy link
Collaborator

djc commented Nov 16, 2021

The formatting changed because rustfmt usually doesn't work inside calls to macros, and you moved those constants out of macro context. So that's a good thing. Makes sense to me to make this change, thanks!

@sigmaSd
Copy link
Contributor Author

sigmaSd commented Nov 16, 2021

I see, thanks as well

@djc
Copy link
Collaborator

djc commented Nov 16, 2021

(Note that #319 moves lazy_static to be for examples only, so if I figure out the regression it introduced we'll be able to do without once_cell for the library itself.)

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.

None yet

2 participants