From 1129d5b6e62a8be4f0ce29ee00f619fa373ffe8b Mon Sep 17 00:00:00 2001 From: Ivan Date: Mon, 21 Oct 2024 17:05:52 +0200 Subject: [PATCH] Fix missing fn --- crates/librqbit/src/torrent_state/live/peer/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/librqbit/src/torrent_state/live/peer/mod.rs b/crates/librqbit/src/torrent_state/live/peer/mod.rs index b0895f8..3c6e6af 100644 --- a/crates/librqbit/src/torrent_state/live/peer/mod.rs +++ b/crates/librqbit/src/torrent_state/live/peer/mod.rs @@ -148,6 +148,10 @@ impl PeerStateNoMut { } } + pub fn is_live(&self) -> bool { + matches!(&self.0, PeerState::Live(_)) + } + pub fn get_live_mut(&mut self) -> Option<&mut LivePeerState> { match &mut self.0 { PeerState::Live(l) => Some(l),