rename take to manually drop
This commit is contained in:
1 parent
60a84956d1
commit
5f9e5f607b
4 files changed
+11
-11
No files matched your search
@@ -136,9 +136,9 @@ impl<T: 'static, S: Storage<SignalData<T>>> Signal<T, S> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Take the value out of the signal, invalidating the signal in the process.
|
||||
pub fn take(&self) -> T {
|
||||
self.inner.take().value
|
||||
/// Drop the value out of the signal, invalidating the signal in the process.
|
||||
pub fn manually_drop(&self) -> Option<T> {
|
||||
self.inner.manually_drop().map(|i| i.value)
|
||||
}
|
||||
|
||||
/// Get the scope the signal was created in.
|
||||
|
||||
Reference in new issue
Block a user