Revise Models (#74) #85
Annotations
16 warnings
useless use of `vec!`:
src/wallet/mod.rs#L91
warning: useless use of `vec!`
--> src/wallet/mod.rs:91:27
|
91 | let string_list = vec![
| ___________________________^
92 | | format!("public_key: {}", self.public_key),
93 | | format!("private_key: {}", "-HIDDEN-"),
94 | | format!("classic_address: {}", self.classic_address),
95 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
= note: `#[warn(clippy::useless_vec)]` on by default
help: you can use an array directly
|
91 ~ let string_list = [format!("public_key: {}", self.public_key),
92 + format!("private_key: {}", "-HIDDEN-"),
93 ~ format!("classic_address: {}", self.classic_address)];
|
|
using `clone` on type `Option<AccountSetFlag>` which implements the `Copy` trait:
src/models/transactions/account_set.rs#L233
warning: using `clone` on type `Option<AccountSetFlag>` which implements the `Copy` trait
--> src/models/transactions/account_set.rs:233:24
|
233 | found: self.clear_flag.clone().unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.clear_flag`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
the `Err`-variant returned from this function is very large:
src/models/requests/ledger_entry.rs#L208
warning: the `Err`-variant returned from this function is very large
--> src/models/requests/ledger_entry.rs:208:35
|
208 | fn _get_field_error(&self) -> Result<(), XRPLLedgerEntryException>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/models/requests/exceptions.rs:43:5
|
43 | / DefineExactlyOneOf {
44 | | field1: Cow<'a, str>,
45 | | field2: Cow<'a, str>,
46 | | field3: Cow<'a, str>,
... |
54 | | resource: Cow<'a, str>,
55 | | },
| |_____- the largest variant contains at least 264 bytes
|
= help: try reducing the size of `models::requests::exceptions::XRPLLedgerEntryException<'_>`, for example by boxing large elements or replacing it with `Box<models::requests::exceptions::XRPLLedgerEntryException<'_>>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
= note: `#[warn(clippy::result_large_err)]` on by default
|
this function has too many arguments (9/7):
src/models/ledger/objects/signer_list.rs#L90
warning: this function has too many arguments (9/7)
--> src/models/ledger/objects/signer_list.rs:90:5
|
90 | / pub fn new(
91 | | flags: FlagCollection<SignerListFlag>,
92 | | index: Option<Cow<'a, str>>,
93 | | ledger_index: Option<Cow<'a, str>>,
... |
99 | | signer_quorum: u32,
100 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this function has too many arguments (14/7):
src/models/ledger/objects/ripple_state.rs#L101
warning: this function has too many arguments (14/7)
--> src/models/ledger/objects/ripple_state.rs:101:5
|
101 | / pub fn new(
102 | | flags: FlagCollection<RippleStateFlag>,
103 | | index: Option<Cow<'a, str>>,
104 | | ledger_index: Option<Cow<'a, str>>,
... |
115 | | low_quality_out: Option<u32>,
116 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this function has too many arguments (16/7):
src/models/ledger/objects/pay_channel.rs#L82
warning: this function has too many arguments (16/7)
--> src/models/ledger/objects/pay_channel.rs:82:5
|
82 | / pub fn new(
83 | | index: Option<Cow<'a, str>>,
84 | | ledger_index: Option<Cow<'a, str>>,
85 | | account: Cow<'a, str>,
... |
98 | | source_tag: Option<u32>,
99 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this function has too many arguments (13/7):
src/models/ledger/objects/offer.rs#L81
warning: this function has too many arguments (13/7)
--> src/models/ledger/objects/offer.rs:81:5
|
81 | / pub fn new(
82 | | flags: FlagCollection<OfferFlag>,
83 | | index: Option<Cow<'a, str>>,
84 | | ledger_index: Option<Cow<'a, str>>,
... |
94 | | expiration: Option<u32>,
95 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this function has too many arguments (12/7):
src/models/ledger/objects/nftoken_offer.rs#L83
warning: this function has too many arguments (12/7)
--> src/models/ledger/objects/nftoken_offer.rs:83:5
|
83 | / pub fn new(
84 | | flags: FlagCollection<NFTokenOfferFlag>,
85 | | index: Option<Cow<'a, str>>,
86 | | ledger_index: Option<Cow<'a, str>>,
... |
95 | | owner_node: Option<Cow<'a, str>>,
96 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this function has too many arguments (14/7):
src/models/ledger/objects/escrow.rs#L89
warning: this function has too many arguments (14/7)
--> src/models/ledger/objects/escrow.rs:89:5
|
89 | / pub fn new(
90 | | index: Option<Cow<'a, str>>,
91 | | ledger_index: Option<Cow<'a, str>>,
92 | | account: Cow<'a, str>,
... |
103 | | source_tag: Option<u32>,
104 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this function has too many arguments (12/7):
src/models/ledger/objects/directory_node.rs#L76
warning: this function has too many arguments (12/7)
--> src/models/ledger/objects/directory_node.rs:76:5
|
76 | / pub fn new(
77 | | index: Option<Cow<'a, str>>,
78 | | ledger_index: Option<Cow<'a, str>>,
79 | | indexes: Vec<Cow<'a, str>>,
... |
88 | | taker_pays_issuer: Option<Cow<'a, str>>,
89 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this function has too many arguments (14/7):
src/models/ledger/objects/check.rs#L74
warning: this function has too many arguments (14/7)
--> src/models/ledger/objects/check.rs:74:5
|
74 | / pub fn new(
75 | | index: Option<Cow<'a, str>>,
76 | | ledger_index: Option<Cow<'a, str>>,
77 | | account: Cow<'a, str>,
... |
88 | | source_tag: Option<u32>,
89 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this function has too many arguments (9/7):
src/models/ledger/objects/amm.rs#L102
warning: this function has too many arguments (9/7)
--> src/models/ledger/objects/amm.rs:102:5
|
102 | / pub fn new(
103 | | index: Option<Cow<'a, str>>,
104 | | ledger_index: Option<Cow<'a, str>>,
105 | | amm_account: Cow<'a, str>,
... |
111 | | vote_slots: Option<Vec<VoteEntry>>,
112 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this function has too many arguments (22/7):
src/models/ledger/objects/account_root.rs#L131
warning: this function has too many arguments (22/7)
--> src/models/ledger/objects/account_root.rs:131:5
|
131 | / pub fn new(
132 | | flags: FlagCollection<AccountRootFlag>,
133 | | index: Option<Cow<'a, str>>,
134 | | ledger_index: Option<Cow<'a, str>>,
... |
153 | | wallet_size: Option<u32>,
154 | | ) -> Self {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
|
this lifetime isn't used in the impl:
src/models/exceptions.rs#L34
warning: this lifetime isn't used in the impl
--> src/models/exceptions.rs:34:6
|
34 | impl<'a> alloc::error::Error for XRPLFlagsException {}
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
= note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
|
clippy_check
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
clippy_check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|