diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..a524dd2 --- /dev/null +++ b/rustfmt.toml @@ -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 diff --git a/src/sync.rs b/src/sync.rs index 7f22dae..bc87a7e 100644 --- a/src/sync.rs +++ b/src/sync.rs @@ -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}; diff --git a/src/types/request.rs b/src/types/request.rs index 976f89a..99d0f62 100644 --- a/src/types/request.rs +++ b/src/types/request.rs @@ -218,7 +218,8 @@ pub struct TorrentAddArgs { #[serde(skip_serializing_if = "Option::is_none", rename = "bandwidthPriority")] pub bandwidth_priority: Option, /// 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>, /// list of indices of files not to download