Hacker GitHub

← All repos

rust-lang-nursery/lazy-static.rs

View on GitHub ↗ ★ 2,033 Rust archived

A small macro for defining lazy evaluated static variables in Rust.

4 mentions on Hacker News by 4 people: 0 stories, 4 comments · first 2016-07-04 · latest 2021-04-17

Mentions per year 4 mentions · busiest year 2016 (1)
20082026
  1. …#[cfg(doctest)] doctest!("../README.md"); Now, the readme examples are tested like everything else. https://github.com/rust-lang-nursery/lazy-static.rs/blob/mas...
    comment by Rompect · 2021-04-17 · in I'd like to review your README
  2. …problem was using sort_by_key with a tuple like (a.year, a.month, a.day, a.hour, a.minute). [0]: https://github.com/rust-lang-nursery/lazy-static.rs#example
    comment by tlent · 2019-02-04 · in Learning Rust via Advent of Code
  3. …-> usize provided by the Rust core library. This can be solved by using the lazy_static crate: https://github.com/rust-lang-nursery/lazy-static.rs From the description in the README: Using this macro, it is possible to have statics that…
  4. …without the magic of the event loop. In Rust you'd have to either make an few (unsafe) global ( https://github.com/rust-lang-nursery/lazy-static.rs ) structures to keep track of the event-driven state, or pass them into every callback, or…