meta: prefer std's OnceLock and LazyLock over once_cell

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I35d51abfa9a790206391dca891799d956a6a6964
This commit is contained in:
raf 2026-03-11 17:11:26 +03:00
commit 3678edd355
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF

View file

@ -6,3 +6,10 @@ await-holding-invalid-types = [
"dioxus_signals::WriteLock",
{ path = "dioxus_signals::WriteLock", reason = "Write should not be held over an await point. This will cause any reads or writes to fail while the await is pending since the write borrow is still active." },
]
disallowed-methods = [
{ path = "once_cell::unsync::OnceCell::get_or_init", reason = "use `std::cell::OnceCell` instead, unless you need get_or_try_init in which case #[expect] this lint" },
{ path = "once_cell::sync::OnceCell::get_or_init", reason = "use `std::sync::OnceLock` instead, unless you need get_or_try_init in which case #[expect] this lint" },
{ path = "once_cell::unsync::Lazy::new", reason = "use `std::cell::LazyCell` instead, unless you need into_value" },
{ path = "once_cell::sync::Lazy::new", reason = "use `std::sync::LazyLock` instead, unless you need into_value" },
]