Stub for torrent_file_from_info_and_bytes

This commit is contained in:
Igor Katson 2024-08-13 15:51:04 +01:00
parent e7c7543228
commit cd0f38f0fb
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
3 changed files with 23 additions and 8 deletions

View file

@ -16,7 +16,7 @@ use librqbit_core::hash_id::Id20;
pub enum ReadMetainfoResult<Rx> {
Found {
info: TorrentMetaV1Info<ByteBufOwned>,
bytes: ByteBufOwned,
info_bytes: ByteBufOwned,
rx: Rx,
seen: HashSet<SocketAddr>,
},
@ -81,7 +81,7 @@ pub async fn read_metainfo_from_peer_receiver<A: Stream<Item = SocketAddr> + Unp
},
done = unordered.next(), if !unordered.is_empty() => {
match done {
Some(Ok(info)) => return ReadMetainfoResult::Found { info: info.0, bytes: info.1, seen, rx: addrs },
Some(Ok((info, info_bytes))) => return ReadMetainfoResult::Found { info, info_bytes, seen, rx: addrs },
Some(Err(e)) => {
debug!("{:#}", e);
},