Skip to content

Patches

Patches #1

GitHub Actions / clippy succeeded Nov 6, 2023 in 0s

clippy

31 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 31
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 204 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:201:27
    |
201 |           let service_key = config
    |  ___________________________^
202 | |             .service_key
203 | |             .as_ref()
204 | |             .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 114 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:103:20
    |
103 |           let auth = if let Some(supabase_auth) = &supabase_auth {
    |  ____________________^
104 | |             Some(
105 | |                 web::scope("/auth")
106 | |                     .app_data(web::Data::new(sig_auth))
...   |
113 | |             None
114 | |         };
    | |_________^
    |
    = 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
    |
103 ~         let auth = supabase_auth.as_ref().map(|supabase_auth| web::scope("/auth")
104 +                     .app_data(web::Data::new(sig_auth))
105 +                     .app_data(web::Data::new(supabase_auth.clone()))
106 +                     .service(api::claim_token::service(&config, db.clone()))
107 +                     .service(api::init_auth::service(&config))
108 ~                     .service(api::confirm_auth::service(&config)));
    |

Check warning on line 204 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:201:27
    |
201 |           let service_key = config
    |  ___________________________^
202 | |             .service_key
203 | |             .as_ref()
204 | |             .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 68 in crates/cmds-solana/src/nft/v1/verify_creator_v1.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant field names in struct initialization

warning: redundant field names in struct initialization
  --> crates/cmds-solana/src/nft/v1/verify_creator_v1.rs:68:9
   |
68 |         collection_master_edition: collection_master_edition,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `collection_master_edition`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names

Check warning on line 67 in crates/cmds-solana/src/nft/v1/verify_creator_v1.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant field names in struct initialization

warning: redundant field names in struct initialization
  --> crates/cmds-solana/src/nft/v1/verify_creator_v1.rs:67:9
   |
67 |         collection_metadata: collection_metadata,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `collection_metadata`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
   = note: `#[warn(clippy::redundant_field_names)]` on by default

Check warning on line 312 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:312:17
    |
312 |                 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 299 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:299:17
    |
299 |                 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 294 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.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 288 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:286:17
    |
286 | /                 let res = self
287 | |                     .save_node_output(&id, &node_id, &times, &output)
288 | |                     .await?;
    | |____________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
    |
286 ~                 self
287 +                     .save_node_output(&id, &node_id, &times, &output)
288 +                     .await?;
    |

Check warning on line 281 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:279:17
    |
279 | /                 let res = self
280 | |                     .new_node_run(&id, &node_id, &times, &time, &input)
281 | |                     .await?;
    | |____________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
    |
279 ~                 self
280 +                     .new_node_run(&id, &node_id, &times, &time, &input)
281 +                     .await?;
    |

Check warning on line 274 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.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 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:266:17
    |
266 | /                 let res = self
267 | |                     .push_flow_log(&id, &index, &time, &level, &module, &content)
268 | |                     .await?;
    | |____________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
    |
266 ~                 self
267 +                     .push_flow_log(&id, &index, &time, &level, &module, &content)
268 +                     .await?;
    |

Check warning on line 260 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:260:17
    |
260 |                 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 255 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:255:17
    |
255 |                 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 312 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:312:17
    |
312 |                 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 299 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:299:17
    |
299 |                 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 294 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.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 288 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:286:17
    |
286 | /                 let res = self
287 | |                     .save_node_output(&id, &node_id, &times, &output)
288 | |                     .await?;
    | |____________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
    |
286 ~                 self
287 +                     .save_node_output(&id, &node_id, &times, &output)
288 +                     .await?;
    |

Check warning on line 281 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:279:17
    |
279 | /                 let res = self
280 | |                     .new_node_run(&id, &node_id, &times, &time, &input)
281 | |                     .await?;
    | |____________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
    |
279 ~                 self
280 +                     .new_node_run(&id, &node_id, &times, &time, &input)
281 +                     .await?;
    |

Check warning on line 274 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.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 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:266:17
    |
266 | /                 let res = self
267 | |                     .push_flow_log(&id, &index, &time, &level, &module, &content)
268 | |                     .await?;
    | |____________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
help: omit the `let` binding
    |
266 ~                 self
267 +                     .push_flow_log(&id, &index, &time, &level, &module, &content)
268 +                     .await?;
    |

Check warning on line 260 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:260:17
    |
260 |                 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 255 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:255:17
    |
255 |                 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