space-operator-cli 0.5.0 (#168) #61
clippy
44 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 44 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.82.0 (f6e511eec 2024-10-15)
- cargo 1.82.0 (8f40fc59f 2024-08-21)
- clippy 0.1.82 (f6e511e 2024-10-15)
Annotations
Check warning on line 111 in crates/cmds-solana/src/jupiter/swap.rs
github-actions / clippy
useless conversion to the same type: `std::vec::Vec<solana_sdk::instruction::Instruction>`
warning: useless conversion to the same type: `std::vec::Vec<solana_sdk::instruction::Instruction>`
--> crates/cmds-solana/src/jupiter/swap.rs:111:23
|
111 | instructions: instructions.into(),
| ^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `instructions`
|
= 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
Check warning on line 75 in crates/cmds-solana/src/jupiter/swap.rs
github-actions / clippy
casting to the same type is unnecessary (`u16` -> `u16`)
warning: casting to the same type is unnecessary (`u16` -> `u16`)
--> crates/cmds-solana/src/jupiter/swap.rs:75:38
|
75 | quote_request.slippage_bps = slippage_percent as u16 * 100;
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `slippage_percent`
|
= 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
Check warning on line 111 in crates/cmds-solana/src/jupiter/swap.rs
github-actions / clippy
useless conversion to the same type: `std::vec::Vec<solana_sdk::instruction::Instruction>`
warning: useless conversion to the same type: `std::vec::Vec<solana_sdk::instruction::Instruction>`
--> crates/cmds-solana/src/jupiter/swap.rs:111:23
|
111 | instructions: instructions.into(),
| ^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `instructions`
|
= 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
Check warning on line 75 in crates/cmds-solana/src/jupiter/swap.rs
github-actions / clippy
casting to the same type is unnecessary (`u16` -> `u16`)
warning: casting to the same type is unnecessary (`u16` -> `u16`)
--> crates/cmds-solana/src/jupiter/swap.rs:75:38
|
75 | quote_request.slippage_bps = slippage_percent as u16 * 100;
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `slippage_percent`
|
= 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
Check warning on line 46 in crates/cmds-solana/src/utils.rs
github-actions / clippy
the `Err`-variant returned from this function is very large
warning: the `Err`-variant returned from this function is very large
--> crates/cmds-solana/src/utils.rs:46:65
|
46 | pub fn ui_amount_to_amount(ui_amount: Decimal, decimals: u8) -> crate::Result<u64> {
| ^^^^^^^^^^^^^^^^^^
|
::: crates/cmds-solana/src/error.rs:14:5
|
14 | SolanaClient(#[from] solana_client::client_error::ClientError),
| -------------------------------------------------------------- the largest variant contains at least 224 bytes
|
= help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
Check warning on line 34 in crates/cmds-solana/src/utils.rs
github-actions / clippy
the `Err`-variant returned from this function is very large
warning: the `Err`-variant returned from this function is very large
--> crates/cmds-solana/src/utils.rs:34:44
|
34 | pub fn sol_to_lamports(amount: Decimal) -> crate::Result<u64> {
| ^^^^^^^^^^^^^^^^^^
|
::: crates/cmds-solana/src/error.rs:14:5
|
14 | SolanaClient(#[from] solana_client::client_error::ClientError),
| -------------------------------------------------------------- the largest variant contains at least 224 bytes
|
= help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
Check warning on line 46 in crates/cmds-solana/src/utils.rs
github-actions / clippy
the `Err`-variant returned from this function is very large
warning: the `Err`-variant returned from this function is very large
--> crates/cmds-solana/src/utils.rs:46:65
|
46 | pub fn ui_amount_to_amount(ui_amount: Decimal, decimals: u8) -> crate::Result<u64> {
| ^^^^^^^^^^^^^^^^^^
|
::: crates/cmds-solana/src/error.rs:14:5
|
14 | SolanaClient(#[from] solana_client::client_error::ClientError),
| -------------------------------------------------------------- the largest variant contains at least 224 bytes
|
= help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
Check warning on line 34 in crates/cmds-solana/src/utils.rs
github-actions / clippy
the `Err`-variant returned from this function is very large
warning: the `Err`-variant returned from this function is very large
--> crates/cmds-solana/src/utils.rs:34:44
|
34 | pub fn sol_to_lamports(amount: Decimal) -> crate::Result<u64> {
| ^^^^^^^^^^^^^^^^^^
|
::: crates/cmds-solana/src/error.rs:14:5
|
14 | SolanaClient(#[from] solana_client::client_error::ClientError),
| -------------------------------------------------------------- the largest variant contains at least 224 bytes
|
= help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
Check warning on line 186 in crates/cmds-solana/src/nft/arweave_nft_upload.rs
github-actions / clippy
the `Err`-variant returned from this function is very large
warning: the `Err`-variant returned from this function is very large
--> crates/cmds-solana/src/nft/arweave_nft_upload.rs:186:10
|
186 | ) -> crate::Result<Uploader> {
| ^^^^^^^^^^^^^^^^^^^^^^^
|
::: crates/cmds-solana/src/error.rs:14:5
|
14 | SolanaClient(#[from] solana_client::client_error::ClientError),
| -------------------------------------------------------------- the largest variant contains at least 224 bytes
|
= help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
Check warning on line 186 in crates/cmds-solana/src/nft/arweave_nft_upload.rs
github-actions / clippy
the `Err`-variant returned from this function is very large
warning: the `Err`-variant returned from this function is very large
--> crates/cmds-solana/src/nft/arweave_nft_upload.rs:186:10
|
186 | ) -> crate::Result<Uploader> {
| ^^^^^^^^^^^^^^^^^^^^^^^
|
::: crates/cmds-solana/src/error.rs:14:5
|
14 | SolanaClient(#[from] solana_client::client_error::ClientError),
| -------------------------------------------------------------- the largest variant contains at least 224 bytes
|
= help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
Check warning on line 39 in crates/cmds-solana/src/generate_keypair.rs
github-actions / clippy
the `Err`-variant returned from this function is very large
warning: the `Err`-variant returned from this function is very large
--> crates/cmds-solana/src/generate_keypair.rs:39:54
|
39 | fn generate_keypair(passphrase: &str, seed: &str) -> crate::Result<Keypair> {
| ^^^^^^^^^^^^^^^^^^^^^^
|
::: crates/cmds-solana/src/error.rs:14:5
|
14 | SolanaClient(#[from] solana_client::client_error::ClientError),
| -------------------------------------------------------------- the largest variant contains at least 224 bytes
|
= help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
= 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
Check warning on line 39 in crates/cmds-solana/src/generate_keypair.rs
github-actions / clippy
the `Err`-variant returned from this function is very large
warning: the `Err`-variant returned from this function is very large
--> crates/cmds-solana/src/generate_keypair.rs:39:54
|
39 | fn generate_keypair(passphrase: &str, seed: &str) -> crate::Result<Keypair> {
| ^^^^^^^^^^^^^^^^^^^^^^
|
::: crates/cmds-solana/src/error.rs:14:5
|
14 | SolanaClient(#[from] solana_client::client_error::ClientError),
| -------------------------------------------------------------- the largest variant contains at least 224 bytes
|
= help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
= 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
Check warning on line 1235 in lib/flow-lib/src/solana.rs
github-actions / clippy
using `clone` on type `Pubkey` which implements the `Copy` trait
warning: using `clone` on type `Pubkey` which implements the `Copy` trait
--> lib/flow-lib/src/solana.rs:1235:25
|
1235 | public_key: pubkey.clone(),
| ^^^^^^^^^^^^^^ help: try removing the `clone` call: `pubkey`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 1216 in lib/flow-lib/src/solana.rs
github-actions / clippy
using `clone` on type `Pubkey` which implements the `Copy` trait
warning: using `clone` on type `Pubkey` which implements the `Copy` trait
--> lib/flow-lib/src/solana.rs:1216:40
|
1216 | let x = WalletOrPubkey::Pubkey(pubkey.clone());
| ^^^^^^^^^^^^^^ help: try removing the `clone` call: `pubkey`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 1201 in lib/flow-lib/src/solana.rs
github-actions / clippy
using `clone` on type `Pubkey` which implements the `Copy` trait
warning: using `clone` on type `Pubkey` which implements the `Copy` trait
--> lib/flow-lib/src/solana.rs:1201:25
|
1201 | public_key: pubkey.clone(),
| ^^^^^^^^^^^^^^ help: try removing the `clone` call: `pubkey`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 94 in lib/flow-lib/src/solana.rs
github-actions / clippy
using `clone` on type `Pubkey` which implements the `Copy` trait
warning: using `clone` on type `Pubkey` which implements the `Copy` trait
--> lib/flow-lib/src/solana.rs:94:51
|
94 | Wallet::Adapter { public_key, .. } => public_key.clone(),
| ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*public_key`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 80 in lib/flow-lib/src/solana.rs
github-actions / clippy
using `clone` on type `Pubkey` which implements the `Copy` trait
warning: using `clone` on type `Pubkey` which implements the `Copy` trait
--> lib/flow-lib/src/solana.rs:80:29
|
80 | public_key: public_key.clone(),
| ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*public_key`
|
= 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
Check warning on line 94 in lib/flow-lib/src/solana.rs
github-actions / clippy
using `clone` on type `Pubkey` which implements the `Copy` trait
warning: using `clone` on type `Pubkey` which implements the `Copy` trait
--> lib/flow-lib/src/solana.rs:94:51
|
94 | Wallet::Adapter { public_key, .. } => public_key.clone(),
| ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*public_key`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 80 in lib/flow-lib/src/solana.rs
github-actions / clippy
using `clone` on type `Pubkey` which implements the `Copy` trait
warning: using `clone` on type `Pubkey` which implements the `Copy` trait
--> lib/flow-lib/src/solana.rs:80:29
|
80 | public_key: public_key.clone(),
| ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*public_key`
|
= 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
Check warning on line 88 in crates/space-wasm/src/ffi.rs
github-actions / clippy
match can be simplified with `.unwrap_or_default()`
warning: match can be simplified with `.unwrap_or_default()`
--> crates/space-wasm/src/ffi.rs:85:5
|
85 | / match stub(ctx, bytes, bytes_len) {
86 | | Ok(pointer) => pointer,
87 | | _ => 0,
88 | | }
| |_____^ help: replace it with: `stub(ctx, bytes, bytes_len).unwrap_or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
= note: `#[warn(clippy::manual_unwrap_or_default)]` on by default
Check warning on line 88 in crates/space-wasm/src/ffi.rs
github-actions / clippy
match can be simplified with `.unwrap_or_default()`
warning: match can be simplified with `.unwrap_or_default()`
--> crates/space-wasm/src/ffi.rs:85:5
|
85 | / match stub(ctx, bytes, bytes_len) {
86 | | Ok(pointer) => pointer,
87 | | _ => 0,
88 | | }
| |_____^ help: replace it with: `stub(ctx, bytes, bytes_len).unwrap_or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
= note: `#[warn(clippy::manual_unwrap_or_default)]` on by default
Check warning on line 628 in lib/flow-value/src/with.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:628:26
|
628 | fn to_custom_decimal<'a>(d: &'a Decimal) -> CustomDecimal<'a> {
| ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
628 - fn to_custom_decimal<'a>(d: &'a Decimal) -> CustomDecimal<'a> {
628 + fn to_custom_decimal(d: &Decimal) -> CustomDecimal<'_> {
|
Check warning on line 493 in lib/flow-value/src/with.rs
github-actions / clippy
question mark operator is useless here
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:491:17
|
491 | / Ok(seq
492 | | .next_element()?
493 | | .ok_or_else(|| de::Error::invalid_length(i, &"64"))?)
| |_________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
help: try removing question mark and `Ok()`
|
491 ~ seq
492 + .next_element()?
493 + .ok_or_else(|| de::Error::invalid_length(i, &"64"))
|
Check warning on line 392 in lib/flow-value/src/with.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:392:28
|
392 | fn to_custom_signature<'a>(pk: &'a Signature) -> CustomSignature<'a> {
| ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
392 - fn to_custom_signature<'a>(pk: &'a Signature) -> CustomSignature<'a> {
392 + fn to_custom_signature(pk: &Signature) -> CustomSignature<'_> {
|
Check warning on line 378 in lib/flow-value/src/with.rs
github-actions / clippy
question mark operator is useless here
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:376:17
|
376 | / Ok(seq
377 | | .next_element()?
378 | | .ok_or_else(|| de::Error::invalid_length(i, &"64"))?)
| |_________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
help: try removing question mark and `Ok()`
|
376 ~ seq
377 + .next_element()?
378 + .ok_or_else(|| de::Error::invalid_length(i, &"64"))
|