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:
parent
119f6d2e06
commit
3678edd355
1 changed files with 7 additions and 0 deletions
|
|
@ -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" },
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue