simple-lazy 0.1.0

40 Lines wrapper of std OnceLock
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# simple-lazy

[![Crates.io](https://img.shields.io/crates/v/simple-lazy.svg)](https://crates.io/crates/simple-lazy)
[![API reference](https://docs.rs/once_cell/badge.svg)](https://docs.rs/simple-lazy/)

A 40 lines wrapper of `std::once::OnceLock` that allows you to lazily initialize a value.

Most code is copied from `once_cell` but replace the implementation of once_cell `OnceCell` with std `OnceLock`.

## MSRV

This crate is guaranteed to compile on stable Rust 1.70 and up.

It might be changed since `once_cell_try` is not stable yet.