Skip to content

Flow dep

Flow dep #313

GitHub Actions / clippy succeeded Jan 4, 2025 in 2s

clippy

104 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 104
Note 0
Help 0

Versions

  • rustc 1.83.0 (90b35a623 2024-11-26)
  • cargo 1.83.0 (5ffbef321 2024-10-29)
  • clippy 0.1.83 (90b35a6 2024-11-26)

Annotations

Check warning on line 248 in crates/flow/src/flow_set.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

called `map(..).flatten()` on `Iterator`

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

Check warning on line 72 in crates/cmds-solana/src/record/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

empty line after doc comment

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

Check warning on line 72 in crates/cmds-solana/src/record/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

empty line after doc comment

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

Check warning on line 114 in crates/cmds-solana/src/jupiter/swap.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `std::vec::Vec<solana_sdk::instruction::Instruction>`

warning: useless conversion to the same type: `std::vec::Vec<solana_sdk::instruction::Instruction>`
   --> crates/cmds-solana/src/jupiter/swap.rs: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

Check warning on line 76 in crates/cmds-solana/src/jupiter/swap.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`u16` -> `u16`)

warning: casting to the same type is unnecessary (`u16` -> `u16`)
  --> crates/cmds-solana/src/jupiter/swap.rs: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

Check warning on line 114 in crates/cmds-solana/src/jupiter/swap.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `std::vec::Vec<solana_sdk::instruction::Instruction>`

warning: useless conversion to the same type: `std::vec::Vec<solana_sdk::instruction::Instruction>`
   --> crates/cmds-solana/src/jupiter/swap.rs: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

Check warning on line 76 in crates/cmds-solana/src/jupiter/swap.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`u16` -> `u16`)

warning: casting to the same type is unnecessary (`u16` -> `u16`)
  --> crates/cmds-solana/src/jupiter/swap.rs: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

Check warning on line 225 in crates/cmds-solana/src/governance/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

empty line after doc comment

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 |     ///
    |

Check warning on line 225 in crates/cmds-solana/src/governance/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

empty line after doc comment

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 |     ///
    |

Check warning on line 46 in crates/cmds-solana/src/utils.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
  --> crates/cmds-solana/src/utils.rs:46:65
   |
46 | pub fn ui_amount_to_amount(ui_amount: Decimal, decimals: u8) -> crate::Result<u64> {
   |                                                                 ^^^^^^^^^^^^^^^^^^
   |
  ::: crates/cmds-solana/src/error.rs:14:5
   |
14 |     SolanaClient(#[from] solana_client::client_error::ClientError),
   |     -------------------------------------------------------------- the largest variant contains at least 224 bytes
   |
   = help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check warning on line 34 in crates/cmds-solana/src/utils.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
  --> crates/cmds-solana/src/utils.rs:34:44
   |
34 | pub fn sol_to_lamports(amount: Decimal) -> crate::Result<u64> {
   |                                            ^^^^^^^^^^^^^^^^^^
   |
  ::: crates/cmds-solana/src/error.rs:14:5
   |
14 |     SolanaClient(#[from] solana_client::client_error::ClientError),
   |     -------------------------------------------------------------- the largest variant contains at least 224 bytes
   |
   = help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check warning on line 46 in crates/cmds-solana/src/utils.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
  --> crates/cmds-solana/src/utils.rs:46:65
   |
46 | pub fn ui_amount_to_amount(ui_amount: Decimal, decimals: u8) -> crate::Result<u64> {
   |                                                                 ^^^^^^^^^^^^^^^^^^
   |
  ::: crates/cmds-solana/src/error.rs:14:5
   |
14 |     SolanaClient(#[from] solana_client::client_error::ClientError),
   |     -------------------------------------------------------------- the largest variant contains at least 224 bytes
   |
   = help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check warning on line 34 in crates/cmds-solana/src/utils.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
  --> crates/cmds-solana/src/utils.rs:34:44
   |
34 | pub fn sol_to_lamports(amount: Decimal) -> crate::Result<u64> {
   |                                            ^^^^^^^^^^^^^^^^^^
   |
  ::: crates/cmds-solana/src/error.rs:14:5
   |
14 |     SolanaClient(#[from] solana_client::client_error::ClientError),
   |     -------------------------------------------------------------- the largest variant contains at least 224 bytes
   |
   = help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check warning on line 186 in crates/cmds-solana/src/nft/arweave_nft_upload.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
   --> crates/cmds-solana/src/nft/arweave_nft_upload.rs:186:10
    |
186 |     ) -> crate::Result<Uploader> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: crates/cmds-solana/src/error.rs:14:5
    |
14  |     SolanaClient(#[from] solana_client::client_error::ClientError),
    |     -------------------------------------------------------------- the largest variant contains at least 224 bytes
    |
    = help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check warning on line 186 in crates/cmds-solana/src/nft/arweave_nft_upload.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
   --> crates/cmds-solana/src/nft/arweave_nft_upload.rs:186:10
    |
186 |     ) -> crate::Result<Uploader> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: crates/cmds-solana/src/error.rs:14:5
    |
14  |     SolanaClient(#[from] solana_client::client_error::ClientError),
    |     -------------------------------------------------------------- the largest variant contains at least 224 bytes
    |
    = help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check warning on line 39 in crates/cmds-solana/src/generate_keypair.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
  --> crates/cmds-solana/src/generate_keypair.rs:39:54
   |
39 | fn generate_keypair(passphrase: &str, seed: &str) -> crate::Result<Keypair> {
   |                                                      ^^^^^^^^^^^^^^^^^^^^^^
   |
  ::: crates/cmds-solana/src/error.rs:14:5
   |
14 |     SolanaClient(#[from] solana_client::client_error::ClientError),
   |     -------------------------------------------------------------- the largest variant contains at least 224 bytes
   |
   = help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
   = note: `#[warn(clippy::result_large_err)]` on by default

Check warning on line 39 in crates/cmds-solana/src/generate_keypair.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
  --> crates/cmds-solana/src/generate_keypair.rs:39:54
   |
39 | fn generate_keypair(passphrase: &str, seed: &str) -> crate::Result<Keypair> {
   |                                                      ^^^^^^^^^^^^^^^^^^^^^^
   |
  ::: crates/cmds-solana/src/error.rs:14:5
   |
14 |     SolanaClient(#[from] solana_client::client_error::ClientError),
   |     -------------------------------------------------------------- the largest variant contains at least 224 bytes
   |
   = help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
   = note: `#[warn(clippy::result_large_err)]` on by default

Check warning on line 479 in crates/db/src/connection/conn_impl.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

question mark operator is useless here

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"))
    |

Check warning on line 479 in crates/db/src/connection/conn_impl.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

question mark operator is useless here

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"))
    |

Check warning on line 359 in crates/db/src/connection/conn_impl.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods `insert_deployment`, `get_deployment_id_from_tag_impl`, `get_deployment_impl`, `get_deployment_wallets_impl`, and `get_deployment_flows_impl` are never used

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

Check warning on line 359 in crates/db/src/connection/conn_impl.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

methods `insert_deployment`, `get_deployment_id_from_tag_impl`, `get_deployment_impl`, `get_deployment_wallets_impl`, and `get_deployment_flows_impl` are never used

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

Check warning on line 93 in crates/db/src/connection/proxied_user_conn.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `path`

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`

Check warning on line 88 in crates/db/src/connection/proxied_user_conn.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `id`

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

Check warning on line 93 in crates/db/src/connection/proxied_user_conn.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `path`

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`

Check warning on line 88 in crates/db/src/connection/proxied_user_conn.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `id`

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