Skip to content

Merge pull request #84 from sephynox/wallet-generation #200

Merge pull request #84 from sephynox/wallet-generation

Merge pull request #84 from sephynox/wallet-generation #200

Triggered via push September 7, 2024 09:02
Status Success
Total duration 5m 23s
Artifacts

unit_test.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

71 warnings
direct implementation of `ToString`: src/wallet/mod.rs#L87
warning: direct implementation of `ToString` --> src/wallet/mod.rs:87:1 | 87 | / impl ToString for Wallet { 88 | | /// Returns a string representation of a Wallet. 89 | | fn to_string(&self) -> String { 90 | | let string_list = [ ... | 97 | | } 98 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
accessing first element with `tx_signers.get(0)`: src/transaction/multisign.rs#L24
warning: accessing first element with `tx_signers.get(0)` --> src/transaction/multisign.rs:24:31 | 24 | let tx_signer = match tx_signers.get(0) { | ^^^^^^^^^^^^^^^^^ help: try: `tx_signers.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first = note: `#[warn(clippy::get_first)]` on by default
non-canonical implementation of `partial_cmp` on an `Ord` type: src/models/amount/xrp_amount.rs#L128
warning: non-canonical implementation of `partial_cmp` on an `Ord` type --> src/models/amount/xrp_amount.rs:128:1 | 128 | / impl<'a> PartialOrd for XRPAmount<'a> { 129 | | fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> { | | ________________________________________________________________________- 130 | || let self_decimal: Decimal = self.clone().try_into().unwrap(); 131 | || let other_decimal: Decimal = other.clone().try_into().unwrap(); 132 | || Some(self_decimal.cmp(&other_decimal)) 133 | || } | ||_____- help: change this to: `{ Some(self.cmp(other)) }` 134 | | } | |__^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl
non-canonical implementation of `partial_cmp` on an `Ord` type: src/models/amount/issued_currency_amount.rs#L39
warning: non-canonical implementation of `partial_cmp` on an `Ord` type --> src/models/amount/issued_currency_amount.rs:39:1 | 39 | / impl<'a> PartialOrd for IssuedCurrencyAmount<'a> { 40 | | fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> { | | ________________________________________________________________________- 41 | || self.value.partial_cmp(&other.value) 42 | || } | ||_____- help: change this to: `{ Some(self.cmp(other)) }` 43 | | } | |__^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true: src/models/results/mod.rs#L105
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true --> src/models/results/mod.rs:105:1 | 105 | impl Into<Value> for XRPLOtherResult { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into help: replace the `Into` implementation with `From<models::results::XRPLOtherResult>` | 105 ~ impl From<XRPLOtherResult> for Value { 106 ~ fn from(val: XRPLOtherResult) -> Self { 107 ~ val.0 |
the `Err`-variant returned from this function is very large: src/models/requests/ledger_entry.rs#L212
warning: the `Err`-variant returned from this function is very large --> src/models/requests/ledger_entry.rs:212:35 | 212 | 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#L37
warning: this lifetime isn't used in the impl --> src/models/exceptions.rs:37:6 | 37 | 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
direct implementation of `ToString`: src/core/types/mod.rs#L554
warning: direct implementation of `ToString` --> src/core/types/mod.rs:554:1 | 554 | / impl ToString for SerializedType { 555 | | /// Get the hex representation of the SerializedType bytes. 556 | | fn to_string(&self) -> String { 557 | | hex::encode_upper(self.0.as_slice()) 558 | | } 559 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
needlessly taken reference of left operand: src/core/types/mod.rs#L468
warning: needlessly taken reference of left operand --> src/core/types/mod.rs:468:19 | 468 | } else if &field == ACCOUNT { | ------^^^^^^^^^^^ | | | help: use the left value directly: `field` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
needlessly taken reference of left operand: src/core/types/mod.rs#L462
warning: needlessly taken reference of left operand --> src/core/types/mod.rs:462:12 | 462 | if &field == DESTINATION { | ------^^^^^^^^^^^^^^^ | | | help: use the left value directly: `field` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
this expression creates a reference which is immediately dereferenced by the compiler: src/core/types/mod.rs#L388
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/core/types/mod.rs:388:53 | 388 | let field_instance = get_field_instance(&field); | ^^^^^^ help: change this to: `field` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true: src/core/types/mod.rs#L154
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true --> src/core/types/mod.rs:154:1 | 154 | impl Into<SerializedType> for XRPLTypes { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into = note: `#[warn(clippy::from_over_into)]` on by default help: replace the `Into` implementation with `From<core::types::XRPLTypes>` | 154 ~ impl From<XRPLTypes> for SerializedType { 155 ~ fn from(val: XRPLTypes) -> Self { 156 ~ match val { |
casting to the same type is unnecessary (`u64` -> `u64`): src/core/types/mod.rs#L104
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/core/types/mod.rs:104:50 | 104 | "UInt64" => Ok(XRPLTypes::UInt64(value as u64)), | ^^^^^^^^^^^^ help: try: `value` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
direct implementation of `ToString`: src/core/types/vector256.rs#L99
warning: direct implementation of `ToString` --> src/core/types/vector256.rs:99:1 | 99 | / impl ToString for Vector256 { 100 | | /// Get the hex representation of the Vector256 bytes. 101 | | fn to_string(&self) -> String { 102 | | hex::encode_upper(self.as_ref()) 103 | | } 104 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
direct implementation of `ToString`: src/core/types/hash.rs#L297
warning: direct implementation of `ToString` --> src/core/types/hash.rs:297:1 | 297 | / impl ToString for Hash256 { 298 | | /// Get the hex representation of the Hash256 bytes. 299 | | fn to_string(&self) -> String { 300 | | hex::encode_upper(self.as_ref()) 301 | | } 302 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
direct implementation of `ToString`: src/core/types/hash.rs#L290
warning: direct implementation of `ToString` --> src/core/types/hash.rs:290:1 | 290 | / impl ToString for Hash160 { 291 | | /// Get the hex representation of the Hash160 bytes. 292 | | fn to_string(&self) -> String { 293 | | hex::encode_upper(self.as_ref()) 294 | | } 295 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
direct implementation of `ToString`: src/core/types/hash.rs#L283
warning: direct implementation of `ToString` --> src/core/types/hash.rs:283:1 | 283 | / impl ToString for Hash128 { 284 | | /// Get the hex representation of the Hash128 bytes. 285 | | fn to_string(&self) -> String { 286 | | hex::encode_upper(self.as_ref()) 287 | | } 288 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
direct implementation of `ToString`: src/core/types/currency.rs#L118
warning: direct implementation of `ToString` --> src/core/types/currency.rs:118:1 | 118 | / impl ToString for Currency { 119 | | /// Get the ISO or hex representation of the Currency bytes. 120 | | fn to_string(&self) -> String { 121 | | let buffer = self.0.as_ref(); ... | 134 | | } 135 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
direct implementation of `ToString`: src/core/types/blob.rs#L54
warning: direct implementation of `ToString` --> src/core/types/blob.rs:54:1 | 54 | / impl ToString for Blob { 55 | | /// Get the hex representation of the Blob bytes. 56 | | fn to_string(&self) -> String { 57 | | hex::encode_upper(self.as_ref()) 58 | | } 59 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
direct implementation of `ToString`: src/core/types/amount.rs#L346
warning: direct implementation of `ToString` --> src/core/types/amount.rs:346:1 | 346 | / impl ToString for Amount { 347 | | /// Get the hex representation of the Amount bytes. 348 | | fn to_string(&self) -> String { 349 | | hex::encode_upper(self.as_ref()) 350 | | } 351 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
direct implementation of `ToString`: src/core/types/account_id.rs#L89
warning: direct implementation of `ToString` --> src/core/types/account_id.rs:89:1 | 89 | / impl ToString for AccountId { 90 | | /// Get the classic address of the AccountId bytes. 91 | | fn to_string(&self) -> String { 92 | | encode_classic_address(self.as_ref()).expect("to_string") 93 | | } 94 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
useless conversion to the same type: `[u8; 32]`: src/core/keypairs/algorithms.rs#L417
warning: useless conversion to the same type: `[u8; 32]` --> src/core/keypairs/algorithms.rs:417:49 | 417 | let private: ed25519_dalek::SecretKey = (*raw_private_slice).into(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `(*raw_private_slice)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
direct implementation of `ToString`: src/core/definitions/mod.rs#L135
warning: direct implementation of `ToString` --> src/core/definitions/mod.rs:135:1 | 135 | / impl ToString for FieldHeader { 136 | | /// Convert the FieldHeader to a String. 137 | | fn to_string(&self) -> String { 138 | | format!("{}_{}", self.type_code, self.field_code) 139 | | } 140 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl = note: `#[warn(clippy::to_string_trait_impl)]` on by default
usage of a legacy numeric method: src/core/addresscodec/mod.rs#L204
warning: usage of a legacy numeric method --> src/core/addresscodec/mod.rs:204:48 | 204 | } else if tag.is_some() && tag > Some(u32::max_value().into()) { | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants = note: `#[warn(clippy::legacy_numeric_constants)]` on by default help: use the associated constant instead | 204 | } else if tag.is_some() && tag > Some(u32::MAX.into()) { | ~~~
unneeded `return` statement: src/asynch/wallet/mod.rs#L89
warning: unneeded `return` statement --> src/asynch/wallet/mod.rs:89:31 | 89 | Err(error) => return Err!(error), | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 89 | Err(error) => Err!(error), | ~~~~~~~~~~~
unneeded `return` statement: src/asynch/wallet/mod.rs#L88
warning: unneeded `return` statement --> src/asynch/wallet/mod.rs:88:28 | 88 | Ok(url) => return Ok(url), | ^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 88 | Ok(url) => Ok(url), | ~~~~~~~
this expression creates a reference which is immediately dereferenced by the compiler: src/asynch/transaction/mod.rs#L458
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/asynch/transaction/mod.rs:458:63 | 458 | set_transaction_field_value(prepared_transaction, &tag_field_name, tag)?; | ^^^^^^^^^^^^^^^ help: change this to: `tag_field_name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/asynch/transaction/mod.rs#L455
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/asynch/transaction/mod.rs:455:17 | 455 | &tag_field_name | ^^^^^^^^^^^^^^^ help: change this to: `tag_field_name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/asynch/transaction/mod.rs#L451
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/asynch/transaction/mod.rs:451:66 | 451 | && get_transaction_field_value(prepared_transaction, &tag_field_name).unwrap_or(Some(0)) | ^^^^^^^^^^^^^^^ help: change this to: `tag_field_name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/asynch/transaction/mod.rs#L450
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/asynch/transaction/mod.rs:450:65 | 450 | if validate_transaction_has_field(prepared_transaction, &tag_field_name).is_ok() | ^^^^^^^^^^^^^^^ help: change this to: `tag_field_name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/asynch/transaction/mod.rs#L448
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/asynch/transaction/mod.rs:448:59 | 448 | set_transaction_field_value(prepared_transaction, &account_field_name, address)?; | ^^^^^^^^^^^^^^^^^^^ help: change this to: `account_field_name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/asynch/transaction/mod.rs#L447
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/asynch/transaction/mod.rs:447:62 | 447 | validate_transaction_has_field(prepared_transaction, &account_field_name)?; | ^^^^^^^^^^^^^^^^^^^ help: change this to: `account_field_name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
needlessly taken reference of both operands: src/asynch/transaction/mod.rs#L353
warning: needlessly taken reference of both operands --> src/asynch/transaction/mod.rs:353:24 | 353 | Ok(&source_patch[1][2..] < &target_patch[1][2..]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref help: use the values directly | 353 | Ok(source_patch[1][2..] < target_patch[1][2..]) | ~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
needlessly taken reference of both operands: src/asynch/transaction/mod.rs#L351
warning: needlessly taken reference of both operands --> src/asynch/transaction/mod.rs:351:24 | 351 | Ok(&source_patch[1][1..] < &target_patch[1][1..]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref = note: `#[warn(clippy::op_ref)]` on by default help: use the values directly | 351 | Ok(source_patch[1][1..] < target_patch[1][1..]) | ~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
useless conversion to the same type: `models::results::submit::Submit<'_>`: src/asynch/transaction/mod.rs#L178
warning: useless conversion to the same type: `models::results::submit::Submit<'_>` --> src/asynch/transaction/mod.rs:178:33 | 178 | let submit_result = SubmitResult::from(value); | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `SubmitResult::from()`: `value` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
unneeded `return` statement: src/asynch/transaction/submit_and_wait.rs#L122
warning: unneeded `return` statement --> src/asynch/transaction/submit_and_wait.rs:122:5 | 122 | / return Err!(XRPLSubmitAndWaitException::SubmissionFailed( 123 | | "Transaction not included in ledger".into() 124 | | )); | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `#[warn(clippy::needless_return)]` on by default help: remove `return` | 122 ~ Err!(XRPLSubmitAndWaitException::SubmissionFailed( 123 + "Transaction not included in ledger".into() 124 ~ )) |
returning the result of a `let` binding from a block: src/asynch/clients/json_rpc/mod.rs#L205
warning: returning the result of a `let` binding from a block --> src/asynch/clients/json_rpc/mod.rs:205:13 | 186 | / let response = match client.request(Method::POST, self.url.as_str()).await { 187 | | Ok(client) => { 188 | | if let Err(_error) = client 189 | | .body(request_buf) ... | 202 | | Err(_error) => Err!(XRPLJsonRpcException::ReqwlessError), 203 | | }; | |______________- unnecessary `let` binding 204 | 205 | response | ^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return = note: `#[warn(clippy::let_and_return)]` on by default help: return the expression directly | 186 ~ 187 | 188 ~ match client.request(Method::POST, self.url.as_str()).await { 189 + Ok(client) => { 190 + if let Err(_error) = client 191 + .body(request_buf) 192 + .content_type(ContentType::TextPlain) 193 + .send(&mut rx_buffer) 194 + .await 195 + { 196 + Err!(XRPLJsonRpcException::ReqwlessError) 197 + } else { 198 + match serde_json::from_slice::<XRPLResponse<'_>>(&rx_buffer) { 199 + Ok(response) => Ok(response), 200 + Err(error) => Err!(error), 201 + } 202 + } 203 + } 204 + Err(_error) => Err!(XRPLJsonRpcException::ReqwlessError), 205 + } |
the borrowed expression implements the required traits: src/asynch/clients/json_rpc/mod.rs#L104
warning: the borrowed expression implements the required traits --> src/asynch/clients/json_rpc/mod.rs:104:23 | 104 | .post(&faucet_url.to_string()) | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `faucet_url.to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
this `to_owned` call clones the Cow<'_, str> itself and does not cause the Cow<'_, str> contents to become owned: src/asynch/clients/client.rs#L20
warning: this `to_owned` call clones the Cow<'_, str> itself and does not cause the Cow<'_, str> contents to become owned --> src/asynch/clients/client.rs:20:30 | 20 | Some(id) => Some(id.to_owned()), | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned = note: `#[warn(clippy::suspicious_to_owned)]` on by default help: depending on intent, either make the Cow an Owned variant | 20 | Some(id) => Some(id.into_owned()), | ~~~~~~~~~~~~~~~ help: or clone the Cow itself | 20 | Some(id) => Some(id.clone()), | ~~~~~~~~~~
constants have by default a `'static` lifetime: src/asynch/wallet/mod.rs#L21
warning: constants have by default a `'static` lifetime --> src/asynch/wallet/mod.rs:21:24 | 21 | const DEV_FAUCET_URL: &'static str = "https://faucet.devnet.rippletest.net/accounts"; | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
constants have by default a `'static` lifetime: src/asynch/wallet/mod.rs#L20
warning: constants have by default a `'static` lifetime --> src/asynch/wallet/mod.rs:20:25 | 20 | const TEST_FAUCET_URL: &'static str = "https://faucet.altnet.rippletest.net/accounts"; | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default
unused import: `websocket_base::MessageHandler`: src/asynch/clients/websocket/mod.rs#L18
warning: unused import: `websocket_base::MessageHandler` --> src/asynch/clients/websocket/mod.rs:18:5 | 18 | use websocket_base::MessageHandler; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `Err`: src/asynch/clients/websocket/mod.rs#L3
warning: unused import: `Err` --> src/asynch/clients/websocket/mod.rs:3:5 | 3 | Err, | ^^^ | = note: `#[warn(unused_imports)]` on by default
unneeded unit return type: src/asynch/clients/client.rs#L17
warning: unneeded unit return type --> src/asynch/clients/client.rs:17:60 | 17 | fn set_request_id(&self, request: &mut XRPLRequest<'_>) -> () { | ^^^^^^ help: remove the `-> ()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit = note: `#[warn(clippy::unused_unit)]` on by default
xrpl-rust
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
xrpl-rust
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
xrpl-rust: src/asynch/clients/client.rs#L7
unused import: `Cow`
xrpl-rust
`xrpl-rust` (lib) generated 1 warning (run `cargo fix --lib -p xrpl-rust` to apply 1 suggestion)
xrpl-rust: src/asynch/clients/client.rs#L7
unused import: `Cow`
xrpl-rust
`xrpl-rust` (lib) generated 1 warning (run `cargo fix --lib -p xrpl-rust` to apply 1 suggestion)
xrpl-rust: src/asynch/clients/websocket/mod.rs#L3
unused import: `Err`
xrpl-rust: src/asynch/clients/websocket/mod.rs#L18
unused import: `websocket_base::MessageHandler`
xrpl-rust
`xrpl-rust` (lib) generated 2 warnings (run `cargo fix --lib -p xrpl-rust` to apply 2 suggestions)
xrpl-rust
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
xrpl-rust
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
xrpl-rust
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
xrpl-rust
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
xrpl-rust: src/asynch/clients/websocket/mod.rs#L3
unused import: `Err`
xrpl-rust: src/asynch/clients/websocket/mod.rs#L18
unused import: `websocket_base::MessageHandler`
xrpl-rust
`xrpl-rust` (lib) generated 2 warnings (run `cargo fix --lib -p xrpl-rust` to apply 2 suggestions)
xrpl-rust
`xrpl-rust` (test "integration_tests") generated 1 warning (run `cargo fix --test "integration_tests"` to apply 1 suggestion)