Flow dep #313
docker.yaml
on: pull_request
Build docker image
0s
Annotations
104 warnings
called `map(..).flatten()` on `Iterator`:
crates/flow/src/flow_set.rs#L247
warning: called `map(..).flatten()` on `Iterator`
--> crates/flow/src/flow_set.rs:247:14
|
247 | .map(|flow| flow.interflows_id())
| ______________^
248 | | .flatten()
| |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|flow| flow.interflows_id())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
= note: `#[warn(clippy::map_flatten)]` on by default
|
empty line after doc comment:
crates/cmds-solana/src/record/mod.rs#L71
warning: empty line after doc comment
--> crates/cmds-solana/src/record/mod.rs:71:1
|
71 | / /// #[repr(C)]
72 | |
| |_
...
75 | pub struct RecordData {
| --------------------- the comment documents this struct
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
= help: if the empty line is unintentional remove it
|
empty line after doc comment:
crates/cmds-solana/src/record/mod.rs#L71
warning: empty line after doc comment
--> crates/cmds-solana/src/record/mod.rs:71:1
|
71 | / /// #[repr(C)]
72 | |
| |_
...
75 | pub struct RecordData {
| --------------------- the comment documents this struct
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
= help: if the empty line is unintentional remove it
|
useless conversion to the same type: `std::vec::Vec<solana_sdk::instruction::Instruction>`:
crates/cmds-solana/src/jupiter/swap.rs#L114
warning: useless conversion to the same type: `std::vec::Vec<solana_sdk::instruction::Instruction>`
--> crates/cmds-solana/src/jupiter/swap.rs:114:23
|
114 | 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
|
casting to the same type is unnecessary (`u16` -> `u16`):
crates/cmds-solana/src/jupiter/swap.rs#L76
warning: casting to the same type is unnecessary (`u16` -> `u16`)
--> crates/cmds-solana/src/jupiter/swap.rs:76:38
|
76 | 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
|
useless conversion to the same type: `std::vec::Vec<solana_sdk::instruction::Instruction>`:
crates/cmds-solana/src/jupiter/swap.rs#L114
warning: useless conversion to the same type: `std::vec::Vec<solana_sdk::instruction::Instruction>`
--> crates/cmds-solana/src/jupiter/swap.rs:114:23
|
114 | 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
|
casting to the same type is unnecessary (`u16` -> `u16`):
crates/cmds-solana/src/jupiter/swap.rs#L76
warning: casting to the same type is unnecessary (`u16` -> `u16`)
--> crates/cmds-solana/src/jupiter/swap.rs:76:38
|
76 | 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
|
empty line after doc comment:
crates/cmds-solana/src/governance/mod.rs#L224
warning: empty line after doc comment
--> crates/cmds-solana/src/governance/mod.rs:224:5
|
224 | / /// the old one must be removed using RemoveTransaction first
225 | |
| |_
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
= note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default
= help: if the empty line is unintentional remove it
help: if the documentation should include the empty line include it in the comment
|
225 | ///
|
|
empty line after doc comment:
crates/cmds-solana/src/governance/mod.rs#L224
warning: empty line after doc comment
--> crates/cmds-solana/src/governance/mod.rs:224:5
|
224 | / /// the old one must be removed using RemoveTransaction first
225 | |
| |_
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
= note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default
= help: if the empty line is unintentional remove it
help: if the documentation should include the empty line include it in the comment
|
225 | ///
|
|
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
|
question mark operator is useless here:
crates/db/src/connection/conn_impl.rs#L469
warning: question mark operator is useless here
--> crates/db/src/connection/conn_impl.rs:469:9
|
469 | / Ok(conn
470 | | .do_query_opt(
471 | | "SELECT deployment_id FROM flow_deployments_tags
472 | | WHERE entrypoint = $1 AND tag = $2 AND user_id = $3",
... |
478 | | .try_get::<_, Uuid>(0)
479 | | .map_err(Error::data("flow_deployments_tags.deployment_id"))?)
| |__________________________________________________________________________^
|
= 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()`
|
469 ~ conn
470 + .do_query_opt(
471 + "SELECT deployment_id FROM flow_deployments_tags
472 + WHERE entrypoint = $1 AND tag = $2 AND user_id = $3",
473 + &[entrypoint, &tag, &self.user_id],
474 + )
475 + .await
476 + .map_err(Error::exec("get_deployment_id_from_tag"))?
477 + .ok_or_else(|| Error::not_found("deployment", format!("{}:{}", entrypoint, tag)))?
478 + .try_get::<_, Uuid>(0)
479 + .map_err(Error::data("flow_deployments_tags.deployment_id"))
|
|
question mark operator is useless here:
crates/db/src/connection/conn_impl.rs#L469
warning: question mark operator is useless here
--> crates/db/src/connection/conn_impl.rs:469:9
|
469 | / Ok(conn
470 | | .do_query_opt(
471 | | "SELECT deployment_id FROM flow_deployments_tags
472 | | WHERE entrypoint = $1 AND tag = $2 AND user_id = $3",
... |
478 | | .try_get::<_, Uuid>(0)
479 | | .map_err(Error::data("flow_deployments_tags.deployment_id"))?)
| |__________________________________________________________________________^
|
= 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()`
|
469 ~ conn
470 + .do_query_opt(
471 + "SELECT deployment_id FROM flow_deployments_tags
472 + WHERE entrypoint = $1 AND tag = $2 AND user_id = $3",
473 + &[entrypoint, &tag, &self.user_id],
474 + )
475 + .await
476 + .map_err(Error::exec("get_deployment_id_from_tag"))?
477 + .ok_or_else(|| Error::not_found("deployment", format!("{}:{}", entrypoint, tag)))?
478 + .try_get::<_, Uuid>(0)
479 + .map_err(Error::data("flow_deployments_tags.deployment_id"))
|
|
methods `insert_deployment`, `get_deployment_id_from_tag_impl`, `get_deployment_impl`, `get_deployment_wallets_impl`, and `get_deployment_flows_impl` are never used:
crates/db/src/connection/conn_impl.rs#L359
warning: methods `insert_deployment`, `get_deployment_id_from_tag_impl`, `get_deployment_impl`, `get_deployment_wallets_impl`, and `get_deployment_flows_impl` are never used
--> crates/db/src/connection/conn_impl.rs:359:14
|
344 | impl UserConnection {
| ------------------- methods in this implementation
...
359 | async fn insert_deployment(&self, d: &FlowDeployment) -> crate::Result<DeploymentId> {
| ^^^^^^^^^^^^^^^^^
...
463 | async fn get_deployment_id_from_tag_impl(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
482 | async fn get_deployment_impl(&self, id: &DeploymentId) -> crate::Result<FlowDeployment> {
| ^^^^^^^^^^^^^^^^^^^
...
543 | async fn get_deployment_wallets_impl(&self, id: &DeploymentId) -> crate::Result<Vec<i64>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
560 | async fn get_deployment_flows_impl(
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
methods `insert_deployment`, `get_deployment_id_from_tag_impl`, `get_deployment_impl`, `get_deployment_wallets_impl`, and `get_deployment_flows_impl` are never used:
crates/db/src/connection/conn_impl.rs#L359
warning: methods `insert_deployment`, `get_deployment_id_from_tag_impl`, `get_deployment_impl`, `get_deployment_wallets_impl`, and `get_deployment_flows_impl` are never used
--> crates/db/src/connection/conn_impl.rs:359:14
|
344 | impl UserConnection {
| ------------------- methods in this implementation
...
359 | async fn insert_deployment(&self, d: &FlowDeployment) -> crate::Result<DeploymentId> {
| ^^^^^^^^^^^^^^^^^
...
463 | async fn get_deployment_id_from_tag_impl(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
482 | async fn get_deployment_impl(&self, id: &DeploymentId) -> crate::Result<FlowDeployment> {
| ^^^^^^^^^^^^^^^^^^^
...
543 | async fn get_deployment_wallets_impl(&self, id: &DeploymentId) -> crate::Result<Vec<i64>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
560 | async fn get_deployment_flows_impl(
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused variable: `path`:
crates/db/src/connection/proxied_user_conn.rs#L93
warning: unused variable: `path`
--> crates/db/src/connection/proxied_user_conn.rs:93:43
|
93 | async fn download_storage_file(&self, path: &str) -> crate::Result<Bytes> {
| ^^^^ help: if this is intentional, prefix it with an underscore: `_path`
|
unused variable: `id`:
crates/db/src/connection/proxied_user_conn.rs#L88
warning: unused variable: `id`
--> crates/db/src/connection/proxied_user_conn.rs:88:30
|
88 | async fn get_flow(&self, id: FlowId) -> crate::Result<FlowRow> {
| ^^ help: if this is intentional, prefix it with an underscore: `_id`
|
= note: `#[warn(unused_variables)]` on by default
|
unused variable: `path`:
crates/db/src/connection/proxied_user_conn.rs#L93
warning: unused variable: `path`
--> crates/db/src/connection/proxied_user_conn.rs:93:43
|
93 | async fn download_storage_file(&self, path: &str) -> crate::Result<Bytes> {
| ^^^^ help: if this is intentional, prefix it with an underscore: `_path`
|
unused variable: `id`:
crates/db/src/connection/proxied_user_conn.rs#L88
warning: unused variable: `id`
--> crates/db/src/connection/proxied_user_conn.rs:88:30
|
88 | async fn get_flow(&self, id: FlowId) -> crate::Result<FlowRow> {
| ^^ help: if this is intentional, prefix it with an underscore: `_id`
|
= note: `#[warn(unused_variables)]` on by default
|
called `map(..).flatten()` on `Iterator`:
crates/flow/src/flow_set.rs#L247
warning: called `map(..).flatten()` on `Iterator`
--> crates/flow/src/flow_set.rs:247:14
|
247 | .map(|flow| flow.interflows_id())
| ______________^
248 | | .flatten()
| |______________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|flow| flow.interflows_id())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
= note: `#[warn(clippy::map_flatten)]` on by default
|
using `clone` on type `Pubkey` which implements the `Copy` trait:
lib/flow-lib/src/solana.rs#L1303
warning: using `clone` on type `Pubkey` which implements the `Copy` trait
--> lib/flow-lib/src/solana.rs:1303:25
|
1303 | 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#L1284
warning: using `clone` on type `Pubkey` which implements the `Copy` trait
--> lib/flow-lib/src/solana.rs:1284:40
|
1284 | 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#L1269
warning: using `clone` on type `Pubkey` which implements the `Copy` trait
--> lib/flow-lib/src/solana.rs:1269:25
|
1269 | 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
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
lib/flow-lib/src/solana.rs#L569
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> lib/flow-lib/src/solana.rs:569:18
|
569 | .zip(signers.pubkeys().into_iter())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `signers.pubkeys()`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/iter/traits/iterator.rs:598:12
= 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
|
using `clone` on type `Pubkey` which implements the `Copy` trait:
lib/flow-lib/src/solana.rs#L102
warning: using `clone` on type `Pubkey` which implements the `Copy` trait
--> lib/flow-lib/src/solana.rs:102:51
|
102 | 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#L88
warning: using `clone` on type `Pubkey` which implements the `Copy` trait
--> lib/flow-lib/src/solana.rs:88:29
|
88 | 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
|
unnecessary closure used to substitute value for `Option::None`:
crates/pdg-common/src/nft_metadata/mod.rs#L492
warning: unnecessary closure used to substitute value for `Option::None`
--> crates/pdg-common/src/nft_metadata/mod.rs:492:27
|
492 | let v = match m
| ___________________________^
493 | | .as_object_mut()
494 | | .ok_or_else(|| FromPDGError::ExpectedObject)?
| |____________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
help: use `ok_or` instead
|
494 | .ok_or(FromPDGError::ExpectedObject)?
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
unnecessary closure used to substitute value for `Option::None`:
crates/pdg-common/src/nft_metadata/mod.rs#L469
warning: unnecessary closure used to substitute value for `Option::None`
--> crates/pdg-common/src/nft_metadata/mod.rs:469:27
|
469 | let v = match m
| ___________________________^
470 | | .as_object_mut()
471 | | .ok_or_else(|| FromPDGError::ExpectedObject)?
| |____________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
help: use `ok_or` instead
|
471 | .ok_or(FromPDGError::ExpectedObject)?
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
unnecessary closure used to substitute value for `Option::None`:
crates/pdg-common/src/nft_metadata/mod.rs#L445
warning: unnecessary closure used to substitute value for `Option::None`
--> crates/pdg-common/src/nft_metadata/mod.rs:445:27
|
445 | let v = match m
| ___________________________^
446 | | .as_object_mut()
447 | | .ok_or_else(|| FromPDGError::ExpectedObject)?
| |____________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
help: use `ok_or` instead
|
447 | .ok_or(FromPDGError::ExpectedObject)?
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
unnecessary closure used to substitute value for `Option::None`:
crates/pdg-common/src/nft_metadata/mod.rs#L418
warning: unnecessary closure used to substitute value for `Option::None`
--> crates/pdg-common/src/nft_metadata/mod.rs:418:30
|
418 | let json = match m
| ______________________________^
419 | | .as_object_mut()
420 | | .ok_or_else(|| FromPDGError::ExpectedObject)?
| |____________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
help: use `ok_or` instead
|
420 | .ok_or(FromPDGError::ExpectedObject)?
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
unnecessary closure used to substitute value for `Option::None`:
crates/pdg-common/src/nft_metadata/mod.rs#L394
warning: unnecessary closure used to substitute value for `Option::None`
--> crates/pdg-common/src/nft_metadata/mod.rs:394:27
|
394 | let v = match m
| ___________________________^
395 | | .as_object_mut()
396 | | .ok_or_else(|| FromPDGError::ExpectedObject)?
| |____________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
help: use `ok_or` instead
|
396 | .ok_or(FromPDGError::ExpectedObject)?
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
unnecessary closure used to substitute value for `Option::None`:
crates/pdg-common/src/nft_metadata/mod.rs#L492
warning: unnecessary closure used to substitute value for `Option::None`
--> crates/pdg-common/src/nft_metadata/mod.rs:492:27
|
492 | let v = match m
| ___________________________^
493 | | .as_object_mut()
494 | | .ok_or_else(|| FromPDGError::ExpectedObject)?
| |____________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
help: use `ok_or` instead
|
494 | .ok_or(FromPDGError::ExpectedObject)?
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
unnecessary closure used to substitute value for `Option::None`:
crates/pdg-common/src/nft_metadata/mod.rs#L469
warning: unnecessary closure used to substitute value for `Option::None`
--> crates/pdg-common/src/nft_metadata/mod.rs:469:27
|
469 | let v = match m
| ___________________________^
470 | | .as_object_mut()
471 | | .ok_or_else(|| FromPDGError::ExpectedObject)?
| |____________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
help: use `ok_or` instead
|
471 | .ok_or(FromPDGError::ExpectedObject)?
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
unnecessary closure used to substitute value for `Option::None`:
crates/pdg-common/src/nft_metadata/mod.rs#L445
warning: unnecessary closure used to substitute value for `Option::None`
--> crates/pdg-common/src/nft_metadata/mod.rs:445:27
|
445 | let v = match m
| ___________________________^
446 | | .as_object_mut()
447 | | .ok_or_else(|| FromPDGError::ExpectedObject)?
| |____________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
help: use `ok_or` instead
|
447 | .ok_or(FromPDGError::ExpectedObject)?
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
unnecessary closure used to substitute value for `Option::None`:
crates/pdg-common/src/nft_metadata/mod.rs#L418
warning: unnecessary closure used to substitute value for `Option::None`
--> crates/pdg-common/src/nft_metadata/mod.rs:418:30
|
418 | let json = match m
| ______________________________^
419 | | .as_object_mut()
420 | | .ok_or_else(|| FromPDGError::ExpectedObject)?
| |____________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
help: use `ok_or` instead
|
420 | .ok_or(FromPDGError::ExpectedObject)?
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
unnecessary closure used to substitute value for `Option::None`:
crates/pdg-common/src/nft_metadata/mod.rs#L394
warning: unnecessary closure used to substitute value for `Option::None`
--> crates/pdg-common/src/nft_metadata/mod.rs:394:27
|
394 | let v = match m
| ___________________________^
395 | | .as_object_mut()
396 | | .ok_or_else(|| FromPDGError::ExpectedObject)?
| |____________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
help: use `ok_or` instead
|
396 | .ok_or(FromPDGError::ExpectedObject)?
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
the following explicit lifetimes could be elided: 'a:
crates/utils/src/serde_bs58.rs#L41
warning: the following explicit lifetimes could be elided: 'a
--> crates/utils/src/serde_bs58.rs:41:10
|
41 | impl<'a> serde::Serialize for Bs58<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
41 - impl<'a> serde::Serialize for Bs58<'a> {
41 + impl serde::Serialize for Bs58<'_> {
|
|
the following explicit lifetimes could be elided: 'de:
crates/utils/src/serde_bs58.rs#L10
warning: the following explicit lifetimes could be elided: 'de
--> crates/utils/src/serde_bs58.rs:10:6
|
10 | impl<'de, const N: usize> serde::de::Visitor<'de> for Visitor<N> {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
10 - impl<'de, const N: usize> serde::de::Visitor<'de> for Visitor<N> {
10 + impl<const N: usize> serde::de::Visitor<'_> for Visitor<N> {
|
|
the following explicit lifetimes could be elided: 'de:
crates/utils/src/serde_base64.rs#L12
warning: the following explicit lifetimes could be elided: 'de
--> crates/utils/src/serde_base64.rs:12:6
|
12 | impl<'de> serde::de::Visitor<'de> for Visitor {
| ^^^ ^^^
|
= 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
|
12 - impl<'de> serde::de::Visitor<'de> for Visitor {
12 + impl serde::de::Visitor<'_> for Visitor {
|
|
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
|
empty line after outer attribute:
lib/client/src/types.rs#L314
warning: empty line after outer attribute
--> lib/client/src/types.rs:314:9
|
314 | / #[serde(tag = "event", content = "data")]
315 | |
| |_
316 | pub enum Event {
| -------------- the attribute applies to this enum
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr
= note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default
= help: if the empty line is unintentional remove it
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/lib.rs#L737
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/lib.rs:737:6
|
737 | impl<'a> serde::Serialize for Bytes<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
737 - impl<'a> serde::Serialize for Bytes<'a> {
737 + impl serde::Serialize for Bytes<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L628
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<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L557
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:557:10
|
557 | impl<'a, 'de> Deserialize<'de> for CustomDecimal<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
557 - impl<'a, 'de> Deserialize<'de> for CustomDecimal<'a> {
557 + impl<'de> Deserialize<'de> for CustomDecimal<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L548
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:548:10
|
548 | impl<'a> Serialize for CustomDecimal<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
548 - impl<'a> Serialize for CustomDecimal<'a> {
548 + impl Serialize for CustomDecimal<'_> {
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L491
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"))
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L392
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<'_> {
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L376
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"))
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L333
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:333:10
|
333 | impl<'a, 'de> Deserialize<'de> for CustomSignature<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
333 - impl<'a, 'de> Deserialize<'de> for CustomSignature<'a> {
333 + impl<'de> Deserialize<'de> for CustomSignature<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L324
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:324:10
|
324 | impl<'a> Serialize for CustomSignature<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
324 - impl<'a> Serialize for CustomSignature<'a> {
324 + impl Serialize for CustomSignature<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L263
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:263:25
|
263 | 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
help: elide the lifetimes
|
263 - fn to_custom_pubkey<'a>(pk: &'a Pubkey) -> CustomPubkey<'a> {
263 + fn to_custom_pubkey(pk: &Pubkey) -> CustomPubkey<'_> {
|
|
the following explicit lifetimes could be elided: 'de:
lib/flow-value/src/with.rs#L244
warning: the following explicit lifetimes could be elided: 'de
--> lib/flow-value/src/with.rs:244:10
|
244 | impl<'de, K: Key> de::Visitor<'de> for StrVisitor<K> {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
244 - impl<'de, K: Key> de::Visitor<'de> for StrVisitor<K> {
244 + impl<K: Key> de::Visitor<'_> for StrVisitor<K> {
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L167
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:167:29
|
167 | / ... Ok(seq
168 | | ... .next_element()?
169 | | ... .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()`
|
167 ~ seq
168 + .next_element()?
169 + .ok_or_else(|| de::Error::invalid_length(i, &"64"))
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L158
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:158:25
|
158 | / Ok(seq
159 | | .next_element()?
160 | | .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()`
|
158 ~ seq
159 + .next_element()?
160 + .ok_or_else(|| de::Error::invalid_length(i, &"32"))
|
|
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:29
|
147 | / ... Ok(seq
148 | | ... .next_element()?
149 | | ... .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()`
|
147 ~ seq
148 + .next_element()?
149 + .ok_or_else(|| de::Error::invalid_length(i + 32, &"64"))
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L137
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:137:29
|
137 | / ... Ok(seq
138 | | ... .next_element()?
139 | | ... .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()`
|
137 ~ seq
138 + .next_element()?
139 + .ok_or_else(|| de::Error::invalid_length(i, &"32"))
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L66
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:66:10
|
66 | impl<'a, 'de> Deserialize<'de> for CustomPubkey<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
66 - impl<'a, 'de> Deserialize<'de> for CustomPubkey<'a> {
66 + impl<'de> Deserialize<'de> for CustomPubkey<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L57
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:57:10
|
57 | impl<'a> Serialize for CustomPubkey<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
57 - impl<'a> Serialize for CustomPubkey<'a> {
57 + impl Serialize for CustomPubkey<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/ser/text_repr.rs#L12
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/ser/text_repr.rs:12:6
|
12 | impl<'a> serde::Serialize for TextRepr<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
12 - impl<'a> serde::Serialize for TextRepr<'a> {
12 + impl serde::Serialize for TextRepr<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/ser/text_repr.rs#L6
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/ser/text_repr.rs:6:6
|
6 | impl<'a> TextRepr<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
6 - impl<'a> TextRepr<'a> {
6 + impl TextRepr<'_> {
|
|
this lifetime isn't used in the impl:
lib/flow-value/src/ser/iter_ser.rs#L39
warning: this lifetime isn't used in the impl
--> lib/flow-value/src/ser/iter_ser.rs:39:6
|
39 | impl<'a, I, K, V> serde::Serialize for Map<I>
| ^^
|
= 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
|
the following explicit lifetimes could be elided: 'de:
lib/flow-value/src/de.rs#L290
warning: the following explicit lifetimes could be elided: 'de
--> lib/flow-value/src/de.rs:290:6
|
290 | impl<'de> serde::de::IntoDeserializer<'de, Error> for Value {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
290 - impl<'de> serde::de::IntoDeserializer<'de, Error> for Value {
290 + impl serde::de::IntoDeserializer<'_, Error> for Value {
|
|
the following explicit lifetimes could be elided: 'de:
lib/flow-value/src/value_type.rs#L52
warning: the following explicit lifetimes could be elided: 'de
--> lib/flow-value/src/value_type.rs:52:6
|
52 | impl<'de> serde::de::Visitor<'de> for ValueTypeVisitor {
| ^^^ ^^^
|
= 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
|
52 - impl<'de> serde::de::Visitor<'de> for ValueTypeVisitor {
52 + impl serde::de::Visitor<'_> for ValueTypeVisitor {
|
|
use of `.then_some(..).unwrap_or(..)` can be written more clearly with `if .. else ..`:
crates/integration-tests/src/main.rs#L6
warning: use of `.then_some(..).unwrap_or(..)` can be written more clearly with `if .. else ..`
--> crates/integration-tests/src/main.rs:6:17
|
6 | let dirty = cmd!(sh, "git describe --always --dirty")
| _________________^
7 | | .read()?
8 | | .trim()
9 | | .ends_with("-dirty")
10 | | .then_some("-dirty")
11 | | .unwrap_or("");
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else
= note: `#[warn(clippy::obfuscated_if_else)]` on by default
help: try
|
6 ~ let dirty = if cmd!(sh, "git describe --always --dirty")
7 + .read()?
8 + .trim()
9 ~ .ends_with("-dirty") { "-dirty" } else { "" };
|
|
use of deprecated constant `keypair::tests::test_serialize`:
lib/flow-value/src/keypair.rs#L58
warning: use of deprecated constant `keypair::tests::test_serialize`
--> lib/flow-value/src/keypair.rs:58:5
|
58 | / fn test_serialize() {
59 | | let k = Keypair::new();
60 | | assert_eq!(
61 | | serialize(&k, crate::ser::Serializer).unwrap(),
62 | | Value::B64(k.to_bytes()),
63 | | )
64 | | }
| |_____^
|
use of deprecated constant `keypair::tests::test_enum`:
lib/flow-value/src/keypair.rs#L67
warning: use of deprecated constant `keypair::tests::test_enum`
--> lib/flow-value/src/keypair.rs:67:5
|
67 | / fn test_enum() {
68 | | let key = Keypair::new();
69 | |
70 | | #[derive(serde::Deserialize, PartialEq, Debug)]
... |
91 | | );
92 | | }
| |_____^
|
use of deprecated constant `keypair::tests::test_deserialize_value`:
lib/flow-value/src/keypair.rs#L51
warning: use of deprecated constant `keypair::tests::test_deserialize_value`
--> lib/flow-value/src/keypair.rs:51:5
|
51 | / fn test_deserialize_value() {
52 | | let k = Keypair::new();
53 | | assert_eq!(de(Value::B64(k.to_bytes())), k);
54 | | assert_eq!(de(Value::String(k.to_base58_string())), k);
55 | | }
| |_____^
|
= note: `#[warn(deprecated)]` 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:
crates/utils/src/serde_bs58.rs#L41
warning: the following explicit lifetimes could be elided: 'a
--> crates/utils/src/serde_bs58.rs:41:10
|
41 | impl<'a> serde::Serialize for Bs58<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
41 - impl<'a> serde::Serialize for Bs58<'a> {
41 + impl serde::Serialize for Bs58<'_> {
|
|
the following explicit lifetimes could be elided: 'de:
crates/utils/src/serde_bs58.rs#L10
warning: the following explicit lifetimes could be elided: 'de
--> crates/utils/src/serde_bs58.rs:10:6
|
10 | impl<'de, const N: usize> serde::de::Visitor<'de> for Visitor<N> {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
10 - impl<'de, const N: usize> serde::de::Visitor<'de> for Visitor<N> {
10 + impl<const N: usize> serde::de::Visitor<'_> for Visitor<N> {
|
|
the following explicit lifetimes could be elided: 'de:
crates/utils/src/serde_base64.rs#L12
warning: the following explicit lifetimes could be elided: 'de
--> crates/utils/src/serde_base64.rs:12:6
|
12 | impl<'de> serde::de::Visitor<'de> for Visitor {
| ^^^ ^^^
|
= 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
|
12 - impl<'de> serde::de::Visitor<'de> for Visitor {
12 + impl serde::de::Visitor<'_> for Visitor {
|
|
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
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
lib/flow-lib/src/solana.rs#L569
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> lib/flow-lib/src/solana.rs:569:18
|
569 | .zip(signers.pubkeys().into_iter())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `signers.pubkeys()`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/iter/traits/iterator.rs:598:12
= 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
|
using `clone` on type `Pubkey` which implements the `Copy` trait:
lib/flow-lib/src/solana.rs#L102
warning: using `clone` on type `Pubkey` which implements the `Copy` trait
--> lib/flow-lib/src/solana.rs:102:51
|
102 | 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#L88
warning: using `clone` on type `Pubkey` which implements the `Copy` trait
--> lib/flow-lib/src/solana.rs:88:29
|
88 | 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
|
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/lib.rs#L737
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/lib.rs:737:6
|
737 | impl<'a> serde::Serialize for Bytes<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
737 - impl<'a> serde::Serialize for Bytes<'a> {
737 + impl serde::Serialize for Bytes<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L628
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<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L557
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:557:10
|
557 | impl<'a, 'de> Deserialize<'de> for CustomDecimal<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
557 - impl<'a, 'de> Deserialize<'de> for CustomDecimal<'a> {
557 + impl<'de> Deserialize<'de> for CustomDecimal<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L548
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:548:10
|
548 | impl<'a> Serialize for CustomDecimal<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
548 - impl<'a> Serialize for CustomDecimal<'a> {
548 + impl Serialize for CustomDecimal<'_> {
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L491
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"))
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L392
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<'_> {
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L376
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"))
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L333
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:333:10
|
333 | impl<'a, 'de> Deserialize<'de> for CustomSignature<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
333 - impl<'a, 'de> Deserialize<'de> for CustomSignature<'a> {
333 + impl<'de> Deserialize<'de> for CustomSignature<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L324
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:324:10
|
324 | impl<'a> Serialize for CustomSignature<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
324 - impl<'a> Serialize for CustomSignature<'a> {
324 + impl Serialize for CustomSignature<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L263
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:263:25
|
263 | 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
help: elide the lifetimes
|
263 - fn to_custom_pubkey<'a>(pk: &'a Pubkey) -> CustomPubkey<'a> {
263 + fn to_custom_pubkey(pk: &Pubkey) -> CustomPubkey<'_> {
|
|
the following explicit lifetimes could be elided: 'de:
lib/flow-value/src/with.rs#L244
warning: the following explicit lifetimes could be elided: 'de
--> lib/flow-value/src/with.rs:244:10
|
244 | impl<'de, K: Key> de::Visitor<'de> for StrVisitor<K> {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
244 - impl<'de, K: Key> de::Visitor<'de> for StrVisitor<K> {
244 + impl<K: Key> de::Visitor<'_> for StrVisitor<K> {
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L167
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:167:29
|
167 | / ... Ok(seq
168 | | ... .next_element()?
169 | | ... .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()`
|
167 ~ seq
168 + .next_element()?
169 + .ok_or_else(|| de::Error::invalid_length(i, &"64"))
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L158
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:158:25
|
158 | / Ok(seq
159 | | .next_element()?
160 | | .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()`
|
158 ~ seq
159 + .next_element()?
160 + .ok_or_else(|| de::Error::invalid_length(i, &"32"))
|
|
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:29
|
147 | / ... Ok(seq
148 | | ... .next_element()?
149 | | ... .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()`
|
147 ~ seq
148 + .next_element()?
149 + .ok_or_else(|| de::Error::invalid_length(i + 32, &"64"))
|
|
question mark operator is useless here:
lib/flow-value/src/with.rs#L137
warning: question mark operator is useless here
--> lib/flow-value/src/with.rs:137:29
|
137 | / ... Ok(seq
138 | | ... .next_element()?
139 | | ... .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()`
|
137 ~ seq
138 + .next_element()?
139 + .ok_or_else(|| de::Error::invalid_length(i, &"32"))
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L66
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:66:10
|
66 | impl<'a, 'de> Deserialize<'de> for CustomPubkey<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
66 - impl<'a, 'de> Deserialize<'de> for CustomPubkey<'a> {
66 + impl<'de> Deserialize<'de> for CustomPubkey<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/with.rs#L57
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/with.rs:57:10
|
57 | impl<'a> Serialize for CustomPubkey<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
57 - impl<'a> Serialize for CustomPubkey<'a> {
57 + impl Serialize for CustomPubkey<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/ser/text_repr.rs#L12
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/ser/text_repr.rs:12:6
|
12 | impl<'a> serde::Serialize for TextRepr<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
12 - impl<'a> serde::Serialize for TextRepr<'a> {
12 + impl serde::Serialize for TextRepr<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
lib/flow-value/src/ser/text_repr.rs#L6
warning: the following explicit lifetimes could be elided: 'a
--> lib/flow-value/src/ser/text_repr.rs:6:6
|
6 | impl<'a> TextRepr<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
6 - impl<'a> TextRepr<'a> {
6 + impl TextRepr<'_> {
|
|
this lifetime isn't used in the impl:
lib/flow-value/src/ser/iter_ser.rs#L39
warning: this lifetime isn't used in the impl
--> lib/flow-value/src/ser/iter_ser.rs:39:6
|
39 | impl<'a, I, K, V> serde::Serialize for Map<I>
| ^^
|
= 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
|
the following explicit lifetimes could be elided: 'de:
lib/flow-value/src/de.rs#L290
warning: the following explicit lifetimes could be elided: 'de
--> lib/flow-value/src/de.rs:290:6
|
290 | impl<'de> serde::de::IntoDeserializer<'de, Error> for Value {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
290 - impl<'de> serde::de::IntoDeserializer<'de, Error> for Value {
290 + impl serde::de::IntoDeserializer<'_, Error> for Value {
|
|
the following explicit lifetimes could be elided: 'de:
lib/flow-value/src/value_type.rs#L52
warning: the following explicit lifetimes could be elided: 'de
--> lib/flow-value/src/value_type.rs:52:6
|
52 | impl<'de> serde::de::Visitor<'de> for ValueTypeVisitor {
| ^^^ ^^^
|
= 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
|
52 - impl<'de> serde::de::Visitor<'de> for ValueTypeVisitor {
52 + impl serde::de::Visitor<'_> for ValueTypeVisitor {
|
|