mirror of
https://github.com/kristoferssolo/transmission-rpc.git
synced 2025-12-30 13:21:49 +00:00
formatting
This commit is contained in:
parent
c3a586a73d
commit
18f35a09b3
@ -2,7 +2,9 @@ extern crate transmission_rpc;
|
|||||||
|
|
||||||
use dotenv::dotenv;
|
use dotenv::dotenv;
|
||||||
use std::env;
|
use std::env;
|
||||||
use transmission_rpc::types::{BasicAuth, Result, RpcResponse, TorrentAddArgs, TorrentAddedOrDuplicate};
|
use transmission_rpc::types::{
|
||||||
|
BasicAuth, Result, RpcResponse, TorrentAddArgs, TorrentAddedOrDuplicate,
|
||||||
|
};
|
||||||
use transmission_rpc::TransClient;
|
use transmission_rpc::TransClient;
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
|
|||||||
@ -549,7 +549,10 @@ impl TransClient {
|
|||||||
/// # Panics
|
/// # Panics
|
||||||
/// Either metainfo or torrent filename must be set or this call will panic.
|
/// Either metainfo or torrent filename must be set or this call will panic.
|
||||||
///
|
///
|
||||||
pub async fn torrent_add(&mut self, add: TorrentAddArgs) -> Result<RpcResponse<TorrentAddedOrDuplicate>> {
|
pub async fn torrent_add(
|
||||||
|
&mut self,
|
||||||
|
add: TorrentAddArgs,
|
||||||
|
) -> Result<RpcResponse<TorrentAddedOrDuplicate>> {
|
||||||
assert!(
|
assert!(
|
||||||
!(add.metainfo == None && add.filename == None),
|
!(add.metainfo == None && add.filename == None),
|
||||||
"Metainfo or Filename should be provided"
|
"Metainfo or Filename should be provided"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user