general: Use std's OnceCell where possible
Rust's standard library now provides a drop-in replacement for `OnceCell`. It requires no API changes from `once_cell`'s version. This commit replaces the version from `once_cell` with the new `std` struct where possible. We still need to use `once_cell` for properties until https://github.com/gtk-rs/gtk-rs-core/pull/1113 is merged. We also still need it for Lazy until that lands. Part-of: <https://gitlab.gnome.org/GNOME/Incubator/loupe/-/merge_requests/241>
This commit is contained in:
parent
ffb2e1064d
commit
439286be40
6 changed files with 8 additions and 11 deletions
|
|
@ -41,9 +41,8 @@ use adw::{prelude::*, subclass::prelude::*};
|
|||
use arc_swap::ArcSwap;
|
||||
use futures::prelude::*;
|
||||
use once_cell::sync::Lazy;
|
||||
use once_cell::unsync::OnceCell;
|
||||
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::cell::{Cell, OnceCell, RefCell};
|
||||
use std::sync::Arc;
|
||||
|
||||
/// Default background color around images and behind transparent images
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue