Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patches #10

Merged
merged 6 commits into from
Nov 17, 2023

flow_run.signers

3abe2f2
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

Patches #10

flow_run.signers
3abe2f2
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Nov 17, 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.74.0 (79e9716c9 2023-11-13)
  • cargo 1.74.0 (ecb9851af 2023-10-18)
  • clippy 0.1.74 (79e9716 2023-11-13)

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 143 in crates/flow-server/src/db_worker/signer.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `serde_json::Value`

warning: useless conversion to the same type: `serde_json::Value`
   --> crates/flow-server/src/db_worker/signer.rs:143:29
    |
143 |         Ok((signer.start(), signers_info.into()))
    |                             ^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `signers_info`
    |
    = 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 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 143 in crates/flow-server/src/db_worker/signer.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `serde_json::Value`

warning: useless conversion to the same type: `serde_json::Value`
   --> crates/flow-server/src/db_worker/signer.rs:143:29
    |
143 |         Ok((signer.start(), signers_info.into()))
    |                             ^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `signers_info`
    |
    = 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 337 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: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

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:324:17
    |
324 |                 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 319 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:319:17
    |
319 |                 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 313 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:311:17
    |
311 | /                 let res = self
312 | |                     .save_node_output(&id, &node_id, &times, &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, &times, &output)
313 +                     .await?;
    |

Check warning on line 306 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:304:17
    |
304 | /                 let res = self
305 | |                     .new_node_run(&id, &node_id, &times, &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, &times, &time, &input)
306 +                     .await?;
    |

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_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 293 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: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

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

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

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

See this annotation in the file changed.

@github-actions 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

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

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:324:17
    |
324 |                 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 319 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:319:17
    |
319 |                 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 313 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:311:17
    |
311 | /                 let res = self
312 | |                     .save_node_output(&id, &node_id, &times, &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, &times, &output)
313 +                     .await?;
    |

Check warning on line 306 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:304:17
    |
304 | /                 let res = self
305 | |                     .new_node_run(&id, &node_id, &times, &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, &times, &time, &input)
306 +                     .await?;
    |

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_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 293 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: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?;
    |