This commit is contained in:
Igor Katson 2021-07-13 09:18:45 +01:00
parent 6eef3b9b66
commit 951f610cfd
3 changed files with 4 additions and 4 deletions

View file

@ -90,7 +90,7 @@ impl Inner {
.enumerate()
.map(|(id, mgr)| TorrentListResponseItem {
id,
info_hash: hex::encode(mgr.torrent_state().info_hash().0),
info_hash: mgr.torrent_state().info_hash().as_string(),
})
.collect(),
}
@ -98,7 +98,7 @@ impl Inner {
fn api_torrent_details(&self, idx: usize) -> Option<TorrentDetailsResponse> {
let handle = self.mgr_handle(idx)?;
let info_hash = hex::encode(handle.torrent_state().info_hash().0);
let info_hash = handle.torrent_state().info_hash().as_string();
let files = handle
.torrent_state()
.info()