[fractal/fractal-next] Use unsync variant of OnceCell



commit 56d1b08e447778a354e9b2e41ace719a5d19f57b
Author: Julian Sparber <julian sparber net>
Date:   Wed Oct 13 11:49:06 2021 +0200

    Use unsync variant of OnceCell

 src/application.rs                                       | 2 +-
 src/components/auth_dialog.rs                            | 2 +-
 src/session/account_settings/devices_page/device.rs      | 2 +-
 src/session/account_settings/devices_page/device_item.rs | 2 +-
 src/session/account_settings/devices_page/device_list.rs | 2 +-
 src/session/avatar.rs                                    | 2 +-
 src/session/content/explore/public_room.rs               | 2 +-
 src/session/mod.rs                                       | 2 +-
 src/session/room/event.rs                                | 2 +-
 src/session/room/item.rs                                 | 2 +-
 src/session/room/mod.rs                                  | 2 +-
 src/session/room/timeline.rs                             | 2 +-
 src/session/room_list.rs                                 | 2 +-
 src/session/user.rs                                      | 2 +-
 14 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/src/application.rs b/src/application.rs
index d5f38639..66195760 100644
--- a/src/application.rs
+++ b/src/application.rs
@@ -9,10 +9,10 @@ use gtk::subclass::prelude::*;
 use gtk::{gdk, gio, glib};
 use gtk_macros::action;
 use log::{debug, info};
-use once_cell::sync::OnceCell;
 
 mod imp {
     use super::*;
+    use once_cell::unsync::OnceCell;
 
     #[derive(Debug)]
     pub struct Application {
diff --git a/src/components/auth_dialog.rs b/src/components/auth_dialog.rs
index 0ca84892..dde96631 100644
--- a/src/components/auth_dialog.rs
+++ b/src/components/auth_dialog.rs
@@ -74,7 +74,7 @@ mod imp {
     use glib::object::WeakRef;
     use glib::subclass::{InitializingObject, Signal};
     use glib::SignalHandlerId;
-    use once_cell::sync::{Lazy, OnceCell};
+    use once_cell::{sync::Lazy, unsync::OnceCell};
     use std::cell::RefCell;
 
     #[derive(Debug, Default, CompositeTemplate)]
diff --git a/src/session/account_settings/devices_page/device.rs 
b/src/session/account_settings/devices_page/device.rs
index 8a38ea44..16d7bb05 100644
--- a/src/session/account_settings/devices_page/device.rs
+++ b/src/session/account_settings/devices_page/device.rs
@@ -16,7 +16,7 @@ use log::error;
 mod imp {
     use super::*;
     use glib::object::WeakRef;
-    use once_cell::sync::{Lazy, OnceCell};
+    use once_cell::{sync::Lazy, unsync::OnceCell};
 
     #[derive(Debug, Default)]
     pub struct Device {
diff --git a/src/session/account_settings/devices_page/device_item.rs 
b/src/session/account_settings/devices_page/device_item.rs
index 59d5e29f..e925d956 100644
--- a/src/session/account_settings/devices_page/device_item.rs
+++ b/src/session/account_settings/devices_page/device_item.rs
@@ -22,7 +22,7 @@ impl From<ItemType> for BoxedItemType {
 
 mod imp {
     use super::*;
-    use once_cell::sync::{Lazy, OnceCell};
+    use once_cell::{sync::Lazy, unsync::OnceCell};
 
     #[derive(Debug, Default)]
     pub struct Item {
diff --git a/src/session/account_settings/devices_page/device_list.rs 
b/src/session/account_settings/devices_page/device_list.rs
index 154d086a..c3059ec4 100644
--- a/src/session/account_settings/devices_page/device_list.rs
+++ b/src/session/account_settings/devices_page/device_list.rs
@@ -11,7 +11,7 @@ use super::{Device, DeviceItem};
 
 mod imp {
     use glib::object::WeakRef;
-    use once_cell::sync::{Lazy, OnceCell};
+    use once_cell::{sync::Lazy, unsync::OnceCell};
     use std::cell::{Cell, RefCell};
 
     use super::*;
diff --git a/src/session/avatar.rs b/src/session/avatar.rs
index 4ab465ce..4a9d566a 100644
--- a/src/session/avatar.rs
+++ b/src/session/avatar.rs
@@ -19,7 +19,7 @@ use crate::session::Session;
 mod imp {
     use super::*;
     use glib::object::WeakRef;
-    use once_cell::sync::{Lazy, OnceCell};
+    use once_cell::{sync::Lazy, unsync::OnceCell};
     use std::cell::{Cell, RefCell};
 
     #[derive(Debug, Default)]
diff --git a/src/session/content/explore/public_room.rs b/src/session/content/explore/public_room.rs
index baf747d1..ec1aa5d1 100644
--- a/src/session/content/explore/public_room.rs
+++ b/src/session/content/explore/public_room.rs
@@ -7,7 +7,7 @@ mod imp {
     use super::*;
     use glib::object::WeakRef;
     use glib::signal::SignalHandlerId;
-    use once_cell::sync::{Lazy, OnceCell};
+    use once_cell::{sync::Lazy, unsync::OnceCell};
     use std::cell::{Cell, RefCell};
 
     #[derive(Debug, Default)]
diff --git a/src/session/mod.rs b/src/session/mod.rs
index 5409a357..8c0e2029 100644
--- a/src/session/mod.rs
+++ b/src/session/mod.rs
@@ -62,7 +62,7 @@ use url::Url;
 mod imp {
     use super::*;
     use glib::subclass::{InitializingObject, Signal};
-    use once_cell::sync::{Lazy, OnceCell};
+    use once_cell::{sync::Lazy, unsync::OnceCell};
     use std::cell::{Cell, RefCell};
 
     #[derive(Debug, Default, CompositeTemplate)]
diff --git a/src/session/room/event.rs b/src/session/room/event.rs
index 59142b47..d9c7253f 100644
--- a/src/session/room/event.rs
+++ b/src/session/room/event.rs
@@ -23,7 +23,7 @@ pub struct BoxedSyncRoomEvent(SyncRoomEvent);
 mod imp {
     use super::*;
     use glib::subclass::Signal;
-    use once_cell::sync::{Lazy, OnceCell};
+    use once_cell::{sync::Lazy, unsync::OnceCell};
     use std::cell::{Cell, RefCell};
 
     #[derive(Debug, Default)]
diff --git a/src/session/room/item.rs b/src/session/room/item.rs
index cea294a9..ad1709e1 100644
--- a/src/session/room/item.rs
+++ b/src/session/room/item.rs
@@ -28,7 +28,7 @@ impl From<ItemType> for BoxedItemType {
 
 mod imp {
     use super::*;
-    use once_cell::sync::{Lazy, OnceCell};
+    use once_cell::{sync::Lazy, unsync::OnceCell};
 
     #[derive(Debug, Default)]
     pub struct Item {
diff --git a/src/session/room/mod.rs b/src/session/room/mod.rs
index fa35f3e1..6d2f47cd 100644
--- a/src/session/room/mod.rs
+++ b/src/session/room/mod.rs
@@ -63,7 +63,7 @@ mod imp {
     use super::*;
     use glib::object::WeakRef;
     use glib::subclass::Signal;
-    use once_cell::sync::{Lazy, OnceCell};
+    use once_cell::{sync::Lazy, unsync::OnceCell};
     use std::cell::Cell;
     use std::collections::HashMap;
 
diff --git a/src/session/room/timeline.rs b/src/session/room/timeline.rs
index 6e2a0755..026fc2a1 100644
--- a/src/session/room/timeline.rs
+++ b/src/session/room/timeline.rs
@@ -11,7 +11,7 @@ use crate::utils::do_async;
 
 mod imp {
     use super::*;
-    use once_cell::sync::{Lazy, OnceCell};
+    use once_cell::{sync::Lazy, unsync::OnceCell};
     use std::cell::{Cell, RefCell};
     use std::collections::{HashMap, VecDeque};
 
diff --git a/src/session/room_list.rs b/src/session/room_list.rs
index 21c91719..c75af6f8 100644
--- a/src/session/room_list.rs
+++ b/src/session/room_list.rs
@@ -18,7 +18,7 @@ use std::collections::HashSet;
 mod imp {
     use glib::object::WeakRef;
     use glib::subclass::Signal;
-    use once_cell::sync::{Lazy, OnceCell};
+    use once_cell::{sync::Lazy, unsync::OnceCell};
     use std::cell::RefCell;
 
     use super::*;
diff --git a/src/session/user.rs b/src/session/user.rs
index 71e83bfa..62ce0906 100644
--- a/src/session/user.rs
+++ b/src/session/user.rs
@@ -6,7 +6,7 @@ use crate::session::{Avatar, Session};
 mod imp {
     use super::*;
     use glib::object::WeakRef;
-    use once_cell::sync::{Lazy, OnceCell};
+    use once_cell::{sync::Lazy, unsync::OnceCell};
     use std::{cell::RefCell, convert::TryInto};
 
     #[derive(Debug, Default)]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]