style: add rustfmt.toml

This commit is contained in:
George Miao 2022-10-31 11:17:08 -04:00 committed by Aleksandr
parent da48966953
commit 67959046e8
3 changed files with 14 additions and 3 deletions

10
rustfmt.toml Normal file
View File

@ -0,0 +1,10 @@
version = "Two"
wrap_comments = true
normalize_comments = true
use_field_init_shorthand = true
format_strings = true
format_code_in_doc_comments = true
format_macro_matchers = true

View File

@ -1,8 +1,8 @@
//! Sharable version of `TransClient`.
//!
//! It lifted the requirement of `&mut self` on
//! all requests methods by using a lock on inner state. This may introduce some overhead
//! so choose as needed.
//! all requests methods by using a lock on inner state. This may introduce some
//! overhead so choose as needed.
use std::{ops::Deref, sync::RwLock};

View File

@ -218,7 +218,8 @@ pub struct TorrentAddArgs {
#[serde(skip_serializing_if = "Option::is_none", rename = "bandwidthPriority")]
pub bandwidth_priority: Option<i64>,
/// list of indices of files to be downloaded
/// to ignore some files, put their indices in files_unwanted, otherwise they will still be downloaded
/// to ignore some files, put their indices in files_unwanted, otherwise
/// they will still be downloaded
#[serde(skip_serializing_if = "Option::is_none", rename = "files-wanted")]
pub files_wanted: Option<Vec<i32>>,
/// list of indices of files not to download