From 5df342e442d6fbd2bc00737beb5eccbc311a2005 Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Fri, 6 Dec 2024 12:25:05 +0000 Subject: [PATCH] Nothing: move a comment --- crates/librqbit/src/torrent_state/mod.rs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/crates/librqbit/src/torrent_state/mod.rs b/crates/librqbit/src/torrent_state/mod.rs index 569c48b..3cefaa3 100644 --- a/crates/librqbit/src/torrent_state/mod.rs +++ b/crates/librqbit/src/torrent_state/mod.rs @@ -56,6 +56,15 @@ use self::paused::TorrentStatePaused; pub use self::stats::{TorrentStats, TorrentStatsState}; pub use self::streaming::FileStream; +// State machine transitions. +// +// - error -> initializing +// - initializing -> paused +// - paused -> live +// - live -> paused +// +// - initializing -> error +// - live -> error pub enum ManagedTorrentState { Initializing(Arc), Paused(TorrentStatePaused), @@ -281,16 +290,6 @@ impl ManagedTorrent { peer_rx: Option, start_paused: bool, ) -> anyhow::Result<()> { - // State machine transitions. - // - // - error -> initializing - // - initializing -> paused - // - paused -> live - // - live -> paused - // - // - initializing -> error - // - live -> error - fn _start<'a>( t: &'a Arc, peer_rx: Option,