From f29dccf8bd9035e2390fd5ab203c96171e4adce7 Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Thu, 15 Aug 2024 11:04:47 +0100 Subject: [PATCH] remove deprecated branch --- crates/librqbit/src/session.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/crates/librqbit/src/session.rs b/crates/librqbit/src/session.rs index 6854120..9751e50 100644 --- a/crates/librqbit/src/session.rs +++ b/crates/librqbit/src/session.rs @@ -293,7 +293,6 @@ pub fn read_local_file_including_stdin(filename: &str) -> anyhow::Result pub enum AddTorrent<'a> { Url(Cow<'a, str>), TorrentFileBytes(Bytes), - TorrentInfo(Box), } impl<'a> AddTorrent<'a> { @@ -326,7 +325,6 @@ impl<'a> AddTorrent<'a> { match self { Self::Url(s) => s.into_owned().into_bytes().into(), Self::TorrentFileBytes(b) => b, - Self::TorrentInfo(..) => unimplemented!(), } } } @@ -863,15 +861,6 @@ impl Session { AddTorrent::TorrentFileBytes(bytes) => torrent_from_bytes(bytes) .context("error decoding torrent")? - , - AddTorrent::TorrentInfo(t) => { - // TODO: remove this branch entirely - ParsedTorrentFile{ - info: *t, - info_bytes: Default::default(), - torrent_bytes: Default::default(), - } - }, }; let trackers = torrent.info