gtk-rs-core icon indicating copy to clipboard operation
gtk-rs-core copied to clipboard

Use once_cell::Lazy instead of std::sync::Once

Open sdroege opened this issue 4 years ago • 4 comments

See summary. Simpler and less easy to get wrong.

sdroege avatar Jun 04 '20 09:06 sdroege

I was sure we were already using it...

GuillaumeGomez avatar Jun 04 '20 09:06 GuillaumeGomez

git grep Once src :P

sdroege avatar Jun 04 '20 09:06 sdroege

Your knowledge is too huge for me to handle. :p

GuillaumeGomez avatar Jun 04 '20 09:06 GuillaumeGomez

Requires re-exporting once_cell from glib though, it's used by a macro. So maybe something for once this is merged into std :)

sdroege avatar Jun 04 '20 09:06 sdroege

This is only used in glib-macros, should we still port to once_cell even if we want to potentially get rid of it in the future?

bilelmoussaoui avatar Aug 11 '23 12:08 bilelmoussaoui

glib already re-exports once_cell or not?

sdroege avatar Aug 11 '23 12:08 sdroege

Yes it does

bilelmoussaoui avatar Aug 11 '23 12:08 bilelmoussaoui