From 29d43dfafbe51c3afbbe1c3401fb1a0ca7c8a579 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Sun, 7 May 2023 13:12:57 +0200 Subject: [PATCH] allow to use ApiInternal as a library --- crates/librqbit/src/http_api.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/librqbit/src/http_api.rs b/crates/librqbit/src/http_api.rs index 5683bdc..93deadf 100644 --- a/crates/librqbit/src/http_api.rs +++ b/crates/librqbit/src/http_api.rs @@ -214,7 +214,7 @@ pub struct ApiInternal { type ApiState = Arc; impl ApiInternal { - fn new(session: Arc) -> Self { + pub fn new(session: Arc) -> Self { Self { dht: session.get_dht(), startup_time: Instant::now(), @@ -260,7 +260,7 @@ impl ApiInternal { make_torrent_details(&info_hash, handle.torrent_state().info(), only_files) } - async fn api_add_torrent( + pub async fn api_add_torrent( &self, url: String, opts: Option,