matklad / once_cell

Rust library for single assignment cells and lazy statics without macros
Apache License 2.0
1.84k stars 110 forks source link

changed `Lazy` to use `FnOnce` instead of `Fn` #37

Closed RustyYato closed 5 years ago

RustyYato commented 5 years ago

This change allows for more ergonomic usage of Lazy when embedded in other types or on the stack (not a global static). It does this by allowing strictly more types of closures to be used with Lazy.

matklad commented 5 years ago

bors r+

Thanks!

bors[bot] commented 5 years ago

Build succeeded

matklad commented 5 years ago

published as 0.2.5

On Wed, 7 Aug 2019 at 20:40, bors[bot] notifications@github.com wrote:

Merged #37 https://github.com/matklad/once_cell/pull/37 into master.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/matklad/once_cell/pull/37?email_source=notifications&email_token=AANB3M6PVJPHIMPQLIS75Y3QDMJJFA5CNFSM4IKCQUAKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOS52TPNQ#event-2541041590, or mute the thread https://github.com/notifications/unsubscribe-auth/AANB3M5WCOTB5O5VKIWOCVLQDMJJFANCNFSM4IKCQUAA .

RustyYato commented 5 years ago

Ahhhh! Just realized I forgot to update the Deref impls.

matklad commented 5 years ago

Would you like to send a follow up PR? If you bump version in Cargo.toml and add an entry to changelog, that would be double awesome :)

RustyYato commented 5 years ago

Done