Shared flow #19
clippy
34 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 34 |
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
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
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 205 in crates/flow-server/src/user.rs
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
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 30 in crates/flow-server/src/middleware/auth.rs
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
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 18 in crates/flow-server/src/db_worker/signer.rs
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 337 in crates/db/src/connection/proxied_user_conn.rs
github-actions / clippy
this let-binding has unit value
warning: this let-binding has unit value
--> crates/db/src/connection/proxied_user_conn.rs:337:17
|
337 | 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 324 in crates/db/src/connection/proxied_user_conn.rs
github-actions / clippy
this let-binding has unit value
warning: this let-binding has unit value
--> crates/db/src/connection/proxied_user_conn.rs:324:17
|
324 | let res = self.set_node_finish(&id, &node_id, ×, &time).await?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.set_node_finish(&id, &node_id, ×, &time).await?;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
Check warning on line 319 in crates/db/src/connection/proxied_user_conn.rs
github-actions / clippy
this let-binding has unit value
warning: this let-binding has unit value
--> crates/db/src/connection/proxied_user_conn.rs:319:17
|
319 | let res = self.push_node_error(&id, &node_id, ×, &error).await?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.push_node_error(&id, &node_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 313 in crates/db/src/connection/proxied_user_conn.rs
github-actions / clippy
this let-binding has unit value
warning: this let-binding has unit value
--> crates/db/src/connection/proxied_user_conn.rs:311:17
|
311 | / let res = self
312 | | .save_node_output(&id, &node_id, ×, &output)
313 | | .await?;
| |____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
311 ~ self
312 + .save_node_output(&id, &node_id, ×, &output)
313 + .await?;
|
Check warning on line 306 in crates/db/src/connection/proxied_user_conn.rs
github-actions / clippy
this let-binding has unit value
warning: this let-binding has unit value
--> crates/db/src/connection/proxied_user_conn.rs:304:17
|
304 | / let res = self
305 | | .new_node_run(&id, &node_id, ×, &time, &input)
306 | | .await?;
| |____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
304 ~ self
305 + .new_node_run(&id, &node_id, ×, &time, &input)
306 + .await?;
|
Check warning on line 299 in crates/db/src/connection/proxied_user_conn.rs
github-actions / clippy
this let-binding has unit value
warning: this let-binding has unit value
--> crates/db/src/connection/proxied_user_conn.rs:299:17
|
299 | let res = self.set_run_result(&id, &time, ¬_run, &output).await?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.set_run_result(&id, &time, ¬_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 293 in crates/db/src/connection/proxied_user_conn.rs
github-actions / clippy
this let-binding has unit value
warning: this let-binding has unit value
--> crates/db/src/connection/proxied_user_conn.rs:291:17
|
291 | / let res = self
292 | | .push_flow_log(&id, &index, &time, &level, &module, &content)
293 | | .await?;
| |____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
291 ~ self
292 + .push_flow_log(&id, &index, &time, &level, &module, &content)
293 + .await?;
|
Check warning on line 285 in crates/db/src/connection/proxied_user_conn.rs
github-actions / clippy
this let-binding has unit value
warning: this let-binding has unit value
--> crates/db/src/connection/proxied_user_conn.rs:285:17
|
285 | 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 280 in crates/db/src/connection/proxied_user_conn.rs
github-actions / clippy
this let-binding has unit value
warning: this let-binding has unit value
--> crates/db/src/connection/proxied_user_conn.rs:280:17
|
280 | 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
Check warning on line 245 in crates/db/src/connection/proxied_user_conn.rs
github-actions / clippy
this let-binding has unit value
warning: this let-binding has unit value
--> crates/db/src/connection/proxied_user_conn.rs:245:17
|
245 | let res = self.share_flow_run(id, user).await?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.share_flow_run(id, user).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 41 in crates/db/src/connection/admin.rs
github-actions / clippy
`to_string` applied to a type that implements `Display` in `format!` args
warning: `to_string` applied to a type that implements `Display` in `format!` args
--> crates/db/src/connection/admin.rs:41:56
|
41 | let info = format!("inserted at {}", Utc::now().to_string());
| ^^^^^^^^^^^^ help: remove this
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args
= note: `#[warn(clippy::to_string_in_format_args)]` on by default
Check warning on line 337 in crates/db/src/connection/proxied_user_conn.rs
github-actions / clippy
this let-binding has unit value
warning: this let-binding has unit value
--> crates/db/src/connection/proxied_user_conn.rs:337:17
|
337 | 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 324 in crates/db/src/connection/proxied_user_conn.rs
github-actions / clippy
this let-binding has unit value
warning: this let-binding has unit value
--> crates/db/src/connection/proxied_user_conn.rs:324:17
|
324 | let res = self.set_node_finish(&id, &node_id, ×, &time).await?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.set_node_finish(&id, &node_id, ×, &time).await?;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
Check warning on line 319 in crates/db/src/connection/proxied_user_conn.rs
github-actions / clippy
this let-binding has unit value
warning: this let-binding has unit value
--> crates/db/src/connection/proxied_user_conn.rs:319:17
|
319 | let res = self.push_node_error(&id, &node_id, ×, &error).await?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.push_node_error(&id, &node_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 313 in crates/db/src/connection/proxied_user_conn.rs
github-actions / clippy
this let-binding has unit value
warning: this let-binding has unit value
--> crates/db/src/connection/proxied_user_conn.rs:311:17
|
311 | / let res = self
312 | | .save_node_output(&id, &node_id, ×, &output)
313 | | .await?;
| |____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
311 ~ self
312 + .save_node_output(&id, &node_id, ×, &output)
313 + .await?;
|
Check warning on line 306 in crates/db/src/connection/proxied_user_conn.rs
github-actions / clippy
this let-binding has unit value
warning: this let-binding has unit value
--> crates/db/src/connection/proxied_user_conn.rs:304:17
|
304 | / let res = self
305 | | .new_node_run(&id, &node_id, ×, &time, &input)
306 | | .await?;
| |____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
304 ~ self
305 + .new_node_run(&id, &node_id, ×, &time, &input)
306 + .await?;
|
Check warning on line 299 in crates/db/src/connection/proxied_user_conn.rs
github-actions / clippy
this let-binding has unit value
warning: this let-binding has unit value
--> crates/db/src/connection/proxied_user_conn.rs:299:17
|
299 | let res = self.set_run_result(&id, &time, ¬_run, &output).await?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.set_run_result(&id, &time, ¬_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 293 in crates/db/src/connection/proxied_user_conn.rs
github-actions / clippy
this let-binding has unit value
warning: this let-binding has unit value
--> crates/db/src/connection/proxied_user_conn.rs:291:17
|
291 | / let res = self
292 | | .push_flow_log(&id, &index, &time, &level, &module, &content)
293 | | .await?;
| |____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
|
291 ~ self
292 + .push_flow_log(&id, &index, &time, &level, &module, &content)
293 + .await?;
|