Skip to content

New Wallet command

New Wallet command #16

This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / clippy succeeded Nov 14, 2023 in 0s

clippy

33 warnings

Details

Results

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

Versions

  • rustc 1.73.0 (cc66ad468 2023-10-03)
  • cargo 1.73.0 (9c4383fb5 2023-08-26)
  • clippy 0.1.73 (cc66ad4 2023-10-03)

Annotations

Check warning on line 140 in crates/flow-server/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

manual implementation of `Option::map`

warning: manual implementation of `Option::map`
   --> crates/flow-server/src/main.rs:129:20
    |
129 |           let auth = if let Some(supabase_auth) = &supabase_auth {
    |  ____________________^
130 | |             Some(
131 | |                 web::scope("/auth")
132 | |                     .app_data(web::Data::new(sig_auth))
...   |
139 | |             None
140 | |         };
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
    = note: `#[warn(clippy::manual_map)]` on by default
help: try
    |
129 ~         let auth = supabase_auth.as_ref().map(|supabase_auth| web::scope("/auth")
130 +                     .app_data(web::Data::new(sig_auth))
131 +                     .app_data(web::Data::new(supabase_auth.clone()))
132 +                     .service(api::claim_token::service(&config, db.clone()))
133 +                     .service(api::init_auth::service(&config))
134 ~                     .service(api::confirm_auth::service(&config)));
    |

Check warning on line 205 in crates/flow-server/src/user.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary closure used to substitute value for `Option::None`

warning: unnecessary closure used to substitute value for `Option::None`
   --> crates/flow-server/src/user.rs:202:27
    |
202 |           let service_key = config
    |  ___________________________^
203 | |             .service_key
204 | |             .as_ref()
205 | |             .ok_or_else(|| "need service_key")?;
    | |______________--------------------------------^
    |                |
    |                help: use `ok_or(..)` instead: `ok_or("need service_key")`
    |
    = 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

Check warning on line 30 in crates/flow-server/src/middleware/auth.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

a `const` item should never be interior mutable

warning: a `const` item should never be interior mutable
  --> crates/flow-server/src/middleware/auth.rs:30:1
   |
30 | pub const X_API_KEY: HeaderName = HeaderName::from_static("x-api-key");
   | -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | make this a static item (maybe with lazy_static)
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
   = note: `#[warn(clippy::declare_interior_mutable_const)]` on by default

Check warning on line 205 in crates/flow-server/src/user.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary closure used to substitute value for `Option::None`

warning: unnecessary closure used to substitute value for `Option::None`
   --> crates/flow-server/src/user.rs:202:27
    |
202 |           let service_key = config
    |  ___________________________^
203 | |             .service_key
204 | |             .as_ref()
205 | |             .ok_or_else(|| "need service_key")?;
    | |______________--------------------------------^
    |                |
    |                help: use `ok_or(..)` instead: `ok_or("need service_key")`
    |
    = 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

Check warning on line 18 in crates/flow-server/src/db_worker/signer.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

large size difference between variants

warning: large size difference between variants
  --> crates/flow-server/src/db_worker/signer.rs:12:1
   |
12 | /  pub enum SignerType {
13 | |      Keypair(Keypair),
   | |      ---------------- the largest variant contains at least 224 bytes
14 | |/     UserWallet {
15 | ||         // Forward to UserWorker
16 | ||         sender: actix::Recipient<SignatureRequest>,
17 | ||     },
   | ||_____- the second-largest variant contains at least 0 bytes
18 | |  }
   | |__^ the entire enum is at least 0 bytes
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
   = note: `#[warn(clippy::large_enum_variant)]` on by default
help: consider boxing the large fields to reduce the total size of the enum
   |
13 |     Keypair(Box<Keypair>),
   |             ~~~~~~~~~~~~

Check warning on line 30 in crates/flow-server/src/middleware/auth.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

a `const` item should never be interior mutable

warning: a `const` item should never be interior mutable
  --> crates/flow-server/src/middleware/auth.rs:30:1
   |
30 | pub const X_API_KEY: HeaderName = HeaderName::from_static("x-api-key");
   | -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | make this a static item (maybe with lazy_static)
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
   = note: `#[warn(clippy::declare_interior_mutable_const)]` on by default

Check warning on line 18 in crates/flow-server/src/db_worker/signer.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

large size difference between variants

warning: large size difference between variants
  --> crates/flow-server/src/db_worker/signer.rs:12:1
   |
12 | /  pub enum SignerType {
13 | |      Keypair(Keypair),
   | |      ---------------- the largest variant contains at least 224 bytes
14 | |/     UserWallet {
15 | ||         // Forward to UserWorker
16 | ||         sender: actix::Recipient<SignatureRequest>,
17 | ||     },
   | ||_____- the second-largest variant contains at least 0 bytes
18 | |  }
   | |__^ the entire enum is at least 0 bytes
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
   = note: `#[warn(clippy::large_enum_variant)]` on by default
help: consider boxing the large fields to reduce the total size of the enum
   |
13 |     Keypair(Box<Keypair>),
   |             ~~~~~~~~~~~~

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:320:17
    |
320 |                 let res = self.save_signature(&id, &signature).await?;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.save_signature(&id, &signature).await?;`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:307:17
    |
307 |                 let res = self.set_node_finish(&id, &node_id, &times, &time).await?;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.set_node_finish(&id, &node_id, &times, &time).await?;`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:302:17
    |
302 |                 let res = self.push_node_error(&id, &node_id, &times, &error).await?;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.push_node_error(&id, &node_id, &times, &error).await?;`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:294:17
    |
294 | /                 let res = self
295 | |                     .save_node_output(&id, &node_id, &times, &output)
296 | |                     .await?;
    | |____________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
    |
294 ~                 self
295 +                     .save_node_output(&id, &node_id, &times, &output)
296 +                     .await?;
    |

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:287:17
    |
287 | /                 let res = self
288 | |                     .new_node_run(&id, &node_id, &times, &time, &input)
289 | |                     .await?;
    | |____________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
    |
287 ~                 self
288 +                     .new_node_run(&id, &node_id, &times, &time, &input)
289 +                     .await?;
    |

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:282:17
    |
282 |                 let res = self.set_run_result(&id, &time, &not_run, &output).await?;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.set_run_result(&id, &time, &not_run, &output).await?;`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:274:17
    |
274 | /                 let res = self
275 | |                     .push_flow_log(&id, &index, &time, &level, &module, &content)
276 | |                     .await?;
    | |____________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
    |
274 ~                 self
275 +                     .push_flow_log(&id, &index, &time, &level, &module, &content)
276 +                     .await?;
    |

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:268:17
    |
268 |                 let res = self.push_flow_error(&id, &error).await?;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.push_flow_error(&id, &error).await?;`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:263:17
    |
263 |                 let res = self.set_start_time(&id, &time).await?;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.set_start_time(&id, &time).await?;`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
    = note: `#[warn(clippy::let_unit_value)]` on by default

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:320:17
    |
320 |                 let res = self.save_signature(&id, &signature).await?;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.save_signature(&id, &signature).await?;`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:307:17
    |
307 |                 let res = self.set_node_finish(&id, &node_id, &times, &time).await?;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.set_node_finish(&id, &node_id, &times, &time).await?;`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:302:17
    |
302 |                 let res = self.push_node_error(&id, &node_id, &times, &error).await?;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.push_node_error(&id, &node_id, &times, &error).await?;`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:294:17
    |
294 | /                 let res = self
295 | |                     .save_node_output(&id, &node_id, &times, &output)
296 | |                     .await?;
    | |____________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
    |
294 ~                 self
295 +                     .save_node_output(&id, &node_id, &times, &output)
296 +                     .await?;
    |

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:287:17
    |
287 | /                 let res = self
288 | |                     .new_node_run(&id, &node_id, &times, &time, &input)
289 | |                     .await?;
    | |____________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
    |
287 ~                 self
288 +                     .new_node_run(&id, &node_id, &times, &time, &input)
289 +                     .await?;
    |

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:282:17
    |
282 |                 let res = self.set_run_result(&id, &time, &not_run, &output).await?;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.set_run_result(&id, &time, &not_run, &output).await?;`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:274:17
    |
274 | /                 let res = self
275 | |                     .push_flow_log(&id, &index, &time, &level, &module, &content)
276 | |                     .await?;
    | |____________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
    |
274 ~                 self
275 +                     .push_flow_log(&id, &index, &time, &level, &module, &content)
276 +                     .await?;
    |

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:268:17
    |
268 |                 let res = self.push_flow_error(&id, &error).await?;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.push_flow_error(&id, &error).await?;`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this let-binding has unit value

warning: this let-binding has unit value
   --> crates/db/src/connection/proxied_user_conn.rs:263:17
    |
263 |                 let res = self.set_start_time(&id, &time).await?;
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.set_start_time(&id, &time).await?;`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
    = note: `#[warn(clippy::let_unit_value)]` on by default