|
@@ -699,12 +699,12 @@ pub trait Manager<R: Runtime>: sealed::ManagerBase<R> {
|
|
self.manager().state().set(state)
|
|
self.manager().state().set(state)
|
|
}
|
|
}
|
|
|
|
|
|
- /// Removes the state managed by the application for T. Returns `true` if it was actually removed
|
|
|
|
- fn unmanage<T>(&self) -> bool
|
|
|
|
|
|
+ /// Removes the state managed by the application for T. Returns the state if it was actually removed.
|
|
|
|
+ fn unmanage<T>(&self) -> Option<T>
|
|
where
|
|
where
|
|
T: Send + Sync + 'static,
|
|
T: Send + Sync + 'static,
|
|
{
|
|
{
|
|
- self.manager().state().unmanage::<T>()
|
|
|
|
|
|
+ self.manager().state().unmanage()
|
|
}
|
|
}
|
|
|
|
|
|
/// Retrieves the managed state for the type `T`.
|
|
/// Retrieves the managed state for the type `T`.
|