Skip to content

Serde with (#148)

Serde with (#148) #54

Triggered via push October 24, 2024 07:44
Status Success
Total duration 5m 31s
Artifacts

docker-main.yaml

on: push
Build docker image
5m 23s
Build docker image
Fit to window
Zoom out
Zoom in

Annotations

32 warnings
the `Err`-variant returned from this function is very large: crates/cmds-solana/src/utils.rs#L50
warning: the `Err`-variant returned from this function is very large --> crates/cmds-solana/src/utils.rs:50:65 | 50 | 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 200 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#L38
warning: the `Err`-variant returned from this function is very large --> crates/cmds-solana/src/utils.rs:38:44 | 38 | 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 200 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#L50
warning: the `Err`-variant returned from this function is very large --> crates/cmds-solana/src/utils.rs:50:65 | 50 | 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 200 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#L38
warning: the `Err`-variant returned from this function is very large --> crates/cmds-solana/src/utils.rs:38:44 | 38 | 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 200 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/candy_machine_core/mod.rs#L139
warning: the `Err`-variant returned from this function is very large --> crates/cmds-solana/src/nft/candy_machine_core/mod.rs:139:31 | 139 | pub fn validate(&self) -> Result<(), Error> { | ^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 160 bytes | = help: try reducing the size of `anchor_lang::error::Error`, for example by boxing large elements or replacing it with `Box<anchor_lang::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/candy_machine_core/mod.rs#L139
warning: the `Err`-variant returned from this function is very large --> crates/cmds-solana/src/nft/candy_machine_core/mod.rs:139:31 | 139 | pub fn validate(&self) -> Result<(), Error> { | ^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 160 bytes | = help: try reducing the size of `anchor_lang::error::Error`, for example by boxing large elements or replacing it with `Box<anchor_lang::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#L187
warning: the `Err`-variant returned from this function is very large --> crates/cmds-solana/src/nft/arweave_nft_upload.rs:187:10 | 187 | ) -> 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 200 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#L49
warning: the `Err`-variant returned from this function is very large --> crates/cmds-solana/src/generate_keypair.rs:49:54 | 49 | 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 200 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/nft/arweave_nft_upload.rs#L187
warning: the `Err`-variant returned from this function is very large --> crates/cmds-solana/src/nft/arweave_nft_upload.rs:187:10 | 187 | ) -> 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 200 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#L49
warning: the `Err`-variant returned from this function is very large --> crates/cmds-solana/src/generate_keypair.rs:49:54 | 49 | 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 200 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
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
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
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")) |