Add tests #224
docker.yaml
on: pull_request
Build docker image
0s
Annotations
37 warnings
the `Err`-variant returned from this function is very large:
crates/cmds-solana/src/utils.rs#L46
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
|
the `Err`-variant returned from this function is very large:
crates/cmds-solana/src/utils.rs#L34
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
|
the `Err`-variant returned from this function is very large:
crates/cmds-solana/src/utils.rs#L46
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
|
the `Err`-variant returned from this function is very large:
crates/cmds-solana/src/utils.rs#L34
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
|
the `Err`-variant returned from this function is very large:
crates/cmds-solana/src/nft/arweave_nft_upload.rs#L186
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
|
the `Err`-variant returned from this function is very large:
crates/cmds-solana/src/nft/arweave_nft_upload.rs#L186
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
|
the `Err`-variant returned from this function is very large:
crates/cmds-solana/src/generate_keypair.rs#L39
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
|
the `Err`-variant returned from this function is very large:
crates/cmds-solana/src/generate_keypair.rs#L39
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
|
using `clone` on type `Pubkey` which implements the `Copy` trait:
lib/flow-lib/src/solana.rs#L1235
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
|
using `clone` on type `Pubkey` which implements the `Copy` trait:
lib/flow-lib/src/solana.rs#L1216
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
|
using `clone` on type `Pubkey` which implements the `Copy` trait:
lib/flow-lib/src/solana.rs#L1201
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
|
using `clone` on type `Pubkey` which implements the `Copy` trait:
lib/flow-lib/src/solana.rs#L94
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
|
using `clone` on type `Pubkey` which implements the `Copy` trait:
lib/flow-lib/src/solana.rs#L80
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
|
using `clone` on type `Pubkey` which implements the `Copy` trait:
lib/flow-lib/src/solana.rs#L94
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
|
using `clone` on type `Pubkey` which implements the `Copy` trait:
lib/flow-lib/src/solana.rs#L80
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
|
match can be simplified with `.unwrap_or_default()`:
crates/space-wasm/src/ffi.rs#L85
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
|
match can be simplified with `.unwrap_or_default()`:
crates/space-wasm/src/ffi.rs#L85
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
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L538
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:538:26
|
538 | 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
|
538 - fn to_custom_decimal<'a>(d: &'a Decimal) -> CustomDecimal<'a> {
538 + fn to_custom_decimal(d: &Decimal) -> CustomDecimal<'_> {
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L401
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:401:17
|
401 | / Ok(seq
402 | | .next_element()?
403 | | .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()`
|
401 ~ seq
402 + .next_element()?
403 + .ok_or_else(|| de::Error::invalid_length(i, &"64"))
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L302
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:302:28
|
302 | 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
|
302 - fn to_custom_signature<'a>(pk: &'a Signature) -> CustomSignature<'a> {
302 + fn to_custom_signature(pk: &Signature) -> CustomSignature<'_> {
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L286
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:286:17
|
286 | / Ok(seq
287 | | .next_element()?
288 | | .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()`
|
286 ~ seq
287 + .next_element()?
288 + .ok_or_else(|| de::Error::invalid_length(i, &"64"))
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L177
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:177:25
|
177 | fn to_custom_pubkey<'a>(pk: &'a Pubkey) -> CustomPubkey<'a> {
| ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
177 - fn to_custom_pubkey<'a>(pk: &'a Pubkey) -> CustomPubkey<'a> {
177 + fn to_custom_pubkey(pk: &Pubkey) -> CustomPubkey<'_> {
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L156
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:156:29
|
156 | / ... Ok(seq
157 | | ... .next_element()?
158 | | ... .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()`
|
156 ~ seq
157 + .next_element()?
158 + .ok_or_else(|| de::Error::invalid_length(i, &"64"))
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L147
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:147:25
|
147 | / Ok(seq
148 | | .next_element()?
149 | | .ok_or_else(|| de::Error::invalid_length(i, &"32"))?)
| |_________________________________________________________________________________^
|
= 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()`
|
147 ~ seq
148 + .next_element()?
149 + .ok_or_else(|| de::Error::invalid_length(i, &"32"))
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L136
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:136:29
|
136 | / ... Ok(seq
137 | | ... .next_element()?
138 | | ... .ok_or_else(|| de::Error::invalid_length(i + 32, &"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()`
|
136 ~ seq
137 + .next_element()?
138 + .ok_or_else(|| de::Error::invalid_length(i + 32, &"64"))
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L126
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:126:29
|
126 | / ... Ok(seq
127 | | ... .next_element()?
128 | | ... .ok_or_else(|| de::Error::invalid_length(i, &"32"))?)
| |_______________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
= note: `#[warn(clippy::needless_question_mark)]` on by default
help: try removing question mark and `Ok()`
|
126 ~ seq
127 + .next_element()?
128 + .ok_or_else(|| de::Error::invalid_length(i, &"32"))
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L538
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:538:26
|
538 | 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
|
538 - fn to_custom_decimal<'a>(d: &'a Decimal) -> CustomDecimal<'a> {
538 + fn to_custom_decimal(d: &Decimal) -> CustomDecimal<'_> {
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L401
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:401:17
|
401 | / Ok(seq
402 | | .next_element()?
403 | | .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()`
|
401 ~ seq
402 + .next_element()?
403 + .ok_or_else(|| de::Error::invalid_length(i, &"64"))
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L302
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:302:28
|
302 | 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
|
302 - fn to_custom_signature<'a>(pk: &'a Signature) -> CustomSignature<'a> {
302 + fn to_custom_signature(pk: &Signature) -> CustomSignature<'_> {
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L286
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:286:17
|
286 | / Ok(seq
287 | | .next_element()?
288 | | .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()`
|
286 ~ seq
287 + .next_element()?
288 + .ok_or_else(|| de::Error::invalid_length(i, &"64"))
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L177
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:177:25
|
177 | fn to_custom_pubkey<'a>(pk: &'a Pubkey) -> CustomPubkey<'a> {
| ^^ ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
177 - fn to_custom_pubkey<'a>(pk: &'a Pubkey) -> CustomPubkey<'a> {
177 + fn to_custom_pubkey(pk: &Pubkey) -> CustomPubkey<'_> {
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L156
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:156:29
|
156 | / ... Ok(seq
157 | | ... .next_element()?
158 | | ... .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()`
|
156 ~ seq
157 + .next_element()?
158 + .ok_or_else(|| de::Error::invalid_length(i, &"64"))
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L147
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:147:25
|
147 | / Ok(seq
148 | | .next_element()?
149 | | .ok_or_else(|| de::Error::invalid_length(i, &"32"))?)
| |_________________________________________________________________________________^
|
= 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()`
|
147 ~ seq
148 + .next_element()?
149 + .ok_or_else(|| de::Error::invalid_length(i, &"32"))
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L136
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:136:29
|
136 | / ... Ok(seq
137 | | ... .next_element()?
138 | | ... .ok_or_else(|| de::Error::invalid_length(i + 32, &"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()`
|
136 ~ seq
137 + .next_element()?
138 + .ok_or_else(|| de::Error::invalid_length(i + 32, &"64"))
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L126
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:126:29
|
126 | / ... Ok(seq
127 | | ... .next_element()?
128 | | ... .ok_or_else(|| de::Error::invalid_length(i, &"32"))?)
| |_______________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
= note: `#[warn(clippy::needless_question_mark)]` on by default
help: try removing question mark and `Ok()`
|
126 ~ seq
127 + .next_element()?
128 + .ok_or_else(|| de::Error::invalid_length(i, &"32"))
|
|
this `.find_map` can be written more simply using `.map(..).next()`:
crates/srpc/src/lib.rs#L162
warning: this `.find_map` can be written more simply using `.map(..).next()`
--> crates/srpc/src/lib.rs:162:9
|
162 | / self.transport.iter().find_map(|t| match t {
163 | | Transport::Http { port, .. } => {
164 | | Some(Url::parse(&format!("http://127.0.0.1:{}", port)).unwrap())
165 | | }
166 | | })
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_find_map
= note: `#[warn(clippy::unnecessary_find_map)]` on by default
|
this `.find_map` can be written more simply using `.map(..).next()`:
crates/srpc/src/lib.rs#L162
warning: this `.find_map` can be written more simply using `.map(..).next()`
--> crates/srpc/src/lib.rs:162:9
|
162 | / self.transport.iter().find_map(|t| match t {
163 | | Transport::Http { port, .. } => {
164 | | Some(Url::parse(&format!("http://127.0.0.1:{}", port)).unwrap())
165 | | }
166 | | })
| |__________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_find_map
= note: `#[warn(clippy::unnecessary_find_map)]` on by default
|