Update for qbittorrent

This commit is contained in:
seanomik 2022-06-21 19:52:27 -04:00
parent 367f2b6d73
commit edf45342fb
3 changed files with 5 additions and 5 deletions

@ -1 +1 @@
Subproject commit ff628b05cf82f053a2bf69f6b961b5afe4e2c1f0
Subproject commit e3e9e26be49aeb34b3985dafbfd043ba6fcc51e2

View File

@ -7,8 +7,8 @@ use crate::{torrent::{TorrentInfo, TorrentTracker, TorrentUpload}, error::Client
pub type ClientResult<T> = Result<T, ClientError>;
#[async_trait]
pub trait TorrentClient<'a> {
async fn login(&mut self, url: &'a str, username: &'a str, password: &'a str) -> ClientResult<()>;
pub trait TorrentClient {
async fn login(&mut self, url: &str, username: &str, password: &str) -> ClientResult<()>;
async fn get_torrent_list(&self) -> ClientResult<Vec<TorrentInfo>>;

View File

@ -92,8 +92,8 @@ impl From<qbittorrent::TrackerStatus> for crate::torrent::TrackerStatus {
}
#[async_trait]
impl<'a> TorrentClient<'a> for QBittorrentClient<'a> {
async fn login(&mut self, url: &'a str, username: &'a str, password: &'a str) -> ClientResult<()> {
impl TorrentClient for QBittorrentClient {
async fn login(&mut self, url: &str, username: &str, password: &str) -> ClientResult<()> {
Ok(Self::login(&mut self, url, username, password).await?)
}