fix: use floats for pointer events (#4708)
* fix: use f64 for PointerInteraction * make clippy happy on beta --------- Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
1 parent
12fab0f9f7
commit
f48aec7eff
11 files changed
+51
-91
No files matched your search
@@ -7,7 +7,7 @@ description = "A box backed by a generational runtime"
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://github.com/DioxusLabs/dioxus/"
|
||||
keywords = ["generational", "box", "memory", "allocator"]
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
rust-version = "1.80.0"
|
||||
|
||||
[dependencies]
|
||||
parking_lot = { workspace = true }
|
||||
|
||||
@@ -22,19 +22,15 @@ type RwLockStorageEntryMut = RwLockWriteGuard<'static, StorageEntry<RwLockStorag
|
||||
type AnyRef = MappedRwLockReadGuard<'static, Box<dyn Any + Send + Sync + 'static>>;
|
||||
type AnyRefMut = MappedRwLockWriteGuard<'static, Box<dyn Any + Send + Sync + 'static>>;
|
||||
|
||||
#[derive(Default)]
|
||||
pub(crate) enum RwLockStorageEntryData {
|
||||
Reference(GenerationalPointer<SyncStorage>),
|
||||
Rc(RcStorageEntry<Box<dyn Any + Send + Sync>>),
|
||||
Data(Box<dyn Any + Send + Sync>),
|
||||
#[default]
|
||||
Empty,
|
||||
}
|
||||
|
||||
impl Default for RwLockStorageEntryData {
|
||||
fn default() -> Self {
|
||||
Self::Empty
|
||||
}
|
||||
}
|
||||
|
||||
impl Debug for RwLockStorageEntryData {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
|
||||
@@ -21,10 +21,12 @@ thread_local! {
|
||||
static UNSYNC_RUNTIME: RefCell<Vec<&'static UnsyncStorage>> = const { RefCell::new(Vec::new()) };
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub(crate) enum RefCellStorageEntryData {
|
||||
Reference(GenerationalPointer<UnsyncStorage>),
|
||||
Rc(RcStorageEntry<Box<dyn Any>>),
|
||||
Data(Box<dyn Any>),
|
||||
#[default]
|
||||
Empty,
|
||||
}
|
||||
|
||||
@@ -39,12 +41,6 @@ impl Debug for RefCellStorageEntryData {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for RefCellStorageEntryData {
|
||||
fn default() -> Self {
|
||||
Self::Empty
|
||||
}
|
||||
}
|
||||
|
||||
/// A unsync storage. This is the default storage type.
|
||||
#[derive(Default)]
|
||||
pub struct UnsyncStorage {
|
||||
|
||||
Reference in new issue
Block a user