SAving, its broken
This commit is contained in:
parent
b15815d12f
commit
efaa36a161
4 changed files with 67 additions and 43 deletions
|
|
@ -53,6 +53,11 @@ impl PeerStates {
|
|||
.map(|e| f(TimedExistence::new(e, reason).value_mut()))
|
||||
}
|
||||
|
||||
pub fn with_live<R>(&self, addr: PeerHandle, f: impl FnOnce(&LivePeerState) -> R) -> Option<R> {
|
||||
self.with_peer(addr, |peer| peer.state.get_live().map(f))
|
||||
.flatten()
|
||||
}
|
||||
|
||||
pub fn with_live_mut<R>(
|
||||
&self,
|
||||
addr: PeerHandle,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue