add as_mapped_ref
This commit is contained in:
1 parent
e45739ac04
commit
b9d179c494
6 files changed
+68
-20
No files matched your search
@@ -1,4 +1,4 @@
|
||||
use crate::SignalMap;
|
||||
use crate::MappedSignal;
|
||||
use std::{
|
||||
cell::RefCell,
|
||||
mem::MaybeUninit,
|
||||
@@ -307,8 +307,8 @@ impl<T: 'static> Signal<T> {
|
||||
}
|
||||
|
||||
/// Map the signal to a new type.
|
||||
pub fn map<O>(self, f: impl Fn(&T) -> &O + 'static) -> SignalMap<O> {
|
||||
SignalMap::new(self, f)
|
||||
pub fn map<O>(self, f: impl Fn(&T) -> &O + 'static) -> MappedSignal<O> {
|
||||
MappedSignal::new(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user