fix ref try map
This commit is contained in:
1 parent
e77c158636
commit
2731ca0b30
2 files changed
+2
-2
No files matched your search
@@ -9,7 +9,6 @@ use std::{
|
||||
fmt::Debug,
|
||||
marker::PhantomData,
|
||||
ops::{Deref, DerefMut},
|
||||
rc::Rc,
|
||||
sync::{atomic::AtomicU32, Arc, OnceLock},
|
||||
};
|
||||
|
||||
@@ -300,7 +299,7 @@ impl<T> Mappable<T> for Ref<'static, T> {
|
||||
_self: Self,
|
||||
f: impl FnOnce(&T) -> Option<&U>,
|
||||
) -> Option<Self::Mapped<U>> {
|
||||
Ref::try_map(_self, f)
|
||||
Ref::filter_map(_self, f).ok()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ futures-util.workspace = true
|
||||
dioxus = { workspace = true }
|
||||
dioxus-desktop = { workspace = true }
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
tracing-subscriber = "0.3.17"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
||||
Reference in new issue
Block a user