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

core: remove vendored lazy_static on no-std #2173

Merged
merged 7 commits into from Jun 22, 2022
Merged

Commits on Jun 22, 2022

  1. core: remove vendored lazy_static on no-std

    Currently, `no_std` targets use a vendored version of `lazy_static` that
    uses the `spin` crate's `Once` type, while the `std` target uses the
    `once_cell` crate's `Lazy` type. This is unfortunate, as the
    `lazy_static` macro has a different interface from the `Lazy` cell type.
    This increases the amount of code that differs based on whether or not
    `std` is enabled.
    
    This branch removes the vendored `lazy_static` macro and replaces it
    with a reimplementation of `once_cell::sync::Lazy` that uses
    `spin::Once` rather than `once_cell::sync::OnceCell` as the inner "once
    type". Now, all code can be written against a `Lazy` struct with the
    same interface, regardless of whether or not `std` is enabled.
    hawkw committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    ede7f08 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f003de5 View commit details
    Browse the repository at this point in the history
  3. whoops i forgot derefmut

    Signed-off-by: Eliza Weisman <eliza@buoyant.io>
    hawkw committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    f38f813 View commit details
    Browse the repository at this point in the history
  4. fix warnings

    Signed-off-by: Eliza Weisman <eliza@buoyant.io>
    hawkw committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    2a98e37 View commit details
    Browse the repository at this point in the history
  5. oops i accidentally deleted the sync impl

    Signed-off-by: Eliza Weisman <eliza@buoyant.io>
    hawkw committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    0c31e98 View commit details
    Browse the repository at this point in the history
  6. dox

    Signed-off-by: Eliza Weisman <eliza@buoyant.io>
    hawkw committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    c0efb7c View commit details
    Browse the repository at this point in the history
  7. fixup! remove unused code

    Signed-off-by: Eliza Weisman <eliza@buoyant.io>
    hawkw committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    0e8b728 View commit details
    Browse the repository at this point in the history