Count effects (#17) #39
basic.yml
on: push
Clippy lint
2m 35s
Unit test
6m 48s
Annotations
61 warnings
manual implementation of `Option::map`:
crates/flow-server/src/main.rs#L131
warning: manual implementation of `Option::map`
--> crates/flow-server/src/main.rs:131:20
|
131 | let auth = if let Some(supabase_auth) = &supabase_auth {
| ____________________^
132 | | Some(
133 | | web::scope("/auth")
134 | | .app_data(web::Data::new(sig_auth))
... |
141 | | None
142 | | };
| |_________^
|
= 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
|
131 ~ let auth = supabase_auth.as_ref().map(|supabase_auth| web::scope("/auth")
132 + .app_data(web::Data::new(sig_auth))
133 + .app_data(web::Data::new(supabase_auth.clone()))
134 + .service(api::claim_token::service(&config, db.clone()))
135 + .service(api::init_auth::service(&config))
136 ~ .service(api::confirm_auth::service(&config)));
|
|
unnecessary closure used to substitute value for `Option::None`:
crates/flow-server/src/user.rs#L210
warning: unnecessary closure used to substitute value for `Option::None`
--> crates/flow-server/src/user.rs:210:27
|
210 | let service_key = config
| ___________________________^
211 | | .service_key
212 | | .as_ref()
213 | | .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
|
a `const` item should never be interior mutable:
crates/flow-server/src/middleware/auth.rs#L30
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
|
unnecessary closure used to substitute value for `Option::None`:
crates/flow-server/src/user.rs#L210
warning: unnecessary closure used to substitute value for `Option::None`
--> crates/flow-server/src/user.rs:210:27
|
210 | let service_key = config
| ___________________________^
211 | | .service_key
212 | | .as_ref()
213 | | .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
|
a `const` item should never be interior mutable:
crates/flow-server/src/middleware/auth.rs#L30
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
|
useless conversion to the same type: `serde_json::Value`:
crates/flow-server/src/db_worker/signer.rs#L143
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
|
useless conversion to the same type: `serde_json::Value`:
crates/flow-server/src/db_worker/signer.rs#L143
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
|
using `clone` on type `User` which implements the `Copy` trait:
crates/flow/src/flow_graph.rs#L351
warning: using `clone` on type `User` which implements the `Copy` trait
--> crates/flow/src/flow_graph.rs:351:26
|
351 | let started_by = registry.started_by.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `registry.started_by`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `User` which implements the `Copy` trait:
crates/flow/src/flow_graph.rs#L350
warning: using `clone` on type `User` which implements the `Copy` trait
--> crates/flow/src/flow_graph.rs:350:26
|
350 | let flow_owner = registry.flow_owner.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `registry.flow_owner`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L337
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
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L324
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
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L319
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
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L311
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?;
|
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L304
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?;
|
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L299
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
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L291
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?;
|
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L285
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
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L280
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
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L245
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
|
`to_string` applied to a type that implements `Display` in `format!` args:
crates/db/src/connection/admin.rs#L41
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
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L337
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
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L324
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
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L319
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
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L311
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?;
|
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L304
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?;
|
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L299
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
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L291
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?;
|
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L285
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
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L280
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
|
this let-binding has unit value:
crates/db/src/connection/proxied_user_conn.rs#L245
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
|
`to_string` applied to a type that implements `Display` in `format!` args:
crates/db/src/connection/admin.rs#L41
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
|
called `is_none()` after searching an `Iterator` with `find`:
crates/cmds-std/src/postgrest/execute_query.rs#L23
warning: called `is_none()` after searching an `Iterator` with `find`
--> crates/cmds-std/src/postgrest/execute_query.rs:23:31
|
23 | let contain_auth_header = input
| _______________________________^
24 | | .headers
25 | | .iter()
26 | | .find(|(k, _)| {
... |
31 | | })
32 | | .is_none();
| |__________________^
|
= help: this is more succinctly expressed by calling `any()` with negation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some
= note: `#[warn(clippy::search_is_some)]` on by default
|
using `clone` on type `User` which implements the `Copy` trait:
crates/flow/src/flow_graph.rs#L351
warning: using `clone` on type `User` which implements the `Copy` trait
--> crates/flow/src/flow_graph.rs:351:26
|
351 | let started_by = registry.started_by.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `registry.started_by`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `User` which implements the `Copy` trait:
crates/flow/src/flow_graph.rs#L350
warning: using `clone` on type `User` which implements the `Copy` trait
--> crates/flow/src/flow_graph.rs:350:26
|
350 | let flow_owner = registry.flow_owner.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `registry.flow_owner`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
called `is_none()` after searching an `Iterator` with `find`:
crates/cmds-std/src/postgrest/execute_query.rs#L23
warning: called `is_none()` after searching an `Iterator` with `find`
--> crates/cmds-std/src/postgrest/execute_query.rs:23:31
|
23 | let contain_auth_header = input
| _______________________________^
24 | | .headers
25 | | .iter()
26 | | .find(|(k, _)| {
... |
31 | | })
32 | | .is_none();
| |__________________^
|
= help: this is more succinctly expressed by calling `any()` with negation
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some
= note: `#[warn(clippy::search_is_some)]` on by default
|
using `clone` on type `Request` which implements the `Copy` trait:
lib/flow-lib/src/context.rs#L116
warning: using `clone` on type `Request` which implements the `Copy` trait
--> lib/flow-lib/src/context.rs:116:18
|
116 | Some(req.clone())
| ^^^^^^^^^^^ help: try dereferencing it: `*req`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
you seem to be trying to use `match` for an equality check. Consider using `if`:
crates/pdg-common/src/nft_metadata/generate.rs#L360
warning: you seem to be trying to use `match` for an equality check. Consider using `if`
--> crates/pdg-common/src/nft_metadata/generate.rs:360:9
|
360 | / match self.fx2 {
361 | | Fx2::Underwater => {
362 | | let jellyfish = FxJellyfish::seed();
363 | | self.fx_jellifish = jellyfish;
... |
375 | | _ => {}
376 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
help: try
|
360 ~ if self.fx2 == Fx2::Underwater {
361 + let jellyfish = FxJellyfish::seed();
362 + self.fx_jellifish = jellyfish;
363 +
364 + self.underwater_fog_amount = rand::random::<f64>() * 30.0;
365 + self.background_underwater_color_hue = 38.8;
366 +
367 + let env_light = if self.fx0 == Fx0::Hologram {
368 + EnvLight::UnderwaterHologram
369 + } else {
370 + EnvLight::Underwater
371 + };
372 + self.env_light = env_light;
373 + }
|
|
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true:
lib/flow-lib/src/config/client.rs#L167
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> lib/flow-lib/src/config/client.rs:167:1
|
167 | impl Into<CmdInputDescription> for Target {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
help: replace the `Into` implementation with `From<config::client::Target>`
|
167 ~ impl From<Target> for CmdInputDescription {
168 ~ fn from(val: Target) -> Self {
169 | CmdInputDescription {
170 ~ name: val.name,
171 ~ type_bounds: val.type_bounds,
172 ~ required: val.required,
173 ~ passthrough: val.passthrough,
|
|
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true:
lib/flow-lib/src/config/client.rs#L148
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> lib/flow-lib/src/config/client.rs:148:1
|
148 | impl Into<CmdOutputDescription> for Source {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `#[warn(clippy::from_over_into)]` on by default
help: replace the `Into` implementation with `From<config::client::Source>`
|
148 ~ impl From<Source> for CmdOutputDescription {
149 ~ fn from(val: Source) -> Self {
150 | CmdOutputDescription {
151 ~ name: val.name,
152 ~ r#type: val.r#type,
153 ~ optional: val.optional,
|
|
using `clone` on type `Request` which implements the `Copy` trait:
lib/flow-lib/src/context.rs#L116
warning: using `clone` on type `Request` which implements the `Copy` trait
--> lib/flow-lib/src/context.rs:116:18
|
116 | Some(req.clone())
| ^^^^^^^^^^^ help: try dereferencing it: `*req`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true:
lib/flow-lib/src/config/client.rs#L167
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> lib/flow-lib/src/config/client.rs:167:1
|
167 | impl Into<CmdInputDescription> for Target {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
help: replace the `Into` implementation with `From<config::client::Target>`
|
167 ~ impl From<Target> for CmdInputDescription {
168 ~ fn from(val: Target) -> Self {
169 | CmdInputDescription {
170 ~ name: val.name,
171 ~ type_bounds: val.type_bounds,
172 ~ required: val.required,
173 ~ passthrough: val.passthrough,
|
|
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true:
lib/flow-lib/src/config/client.rs#L148
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> lib/flow-lib/src/config/client.rs:148:1
|
148 | impl Into<CmdOutputDescription> for Source {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
= note: `#[warn(clippy::from_over_into)]` on by default
help: replace the `Into` implementation with `From<config::client::Source>`
|
148 ~ impl From<Source> for CmdOutputDescription {
149 ~ fn from(val: Source) -> Self {
150 | CmdOutputDescription {
151 ~ name: val.name,
152 ~ r#type: val.r#type,
153 ~ optional: val.optional,
|
|
you seem to be trying to use `match` for an equality check. Consider using `if`:
crates/pdg-common/src/nft_metadata/generate.rs#L360
warning: you seem to be trying to use `match` for an equality check. Consider using `if`
--> crates/pdg-common/src/nft_metadata/generate.rs:360:9
|
360 | / match self.fx2 {
361 | | Fx2::Underwater => {
362 | | let jellyfish = FxJellyfish::seed();
363 | | self.fx_jellifish = jellyfish;
... |
375 | | _ => {}
376 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
help: try
|
360 ~ if self.fx2 == Fx2::Underwater {
361 + let jellyfish = FxJellyfish::seed();
362 + self.fx_jellifish = jellyfish;
363 +
364 + self.underwater_fog_amount = rand::random::<f64>() * 30.0;
365 + self.background_underwater_color_hue = 38.8;
366 +
367 + let env_light = if self.fx0 == Fx0::Hologram {
368 + EnvLight::UnderwaterHologram
369 + } else {
370 + EnvLight::Underwater
371 + };
372 + self.env_light = env_light;
373 + }
|
|
Clippy lint
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, Swatinem/rust-cache@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Clippy lint
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy lint
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy lint
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Unit test
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, Swatinem/rust-cache@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Unit test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Unit test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Unit test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Unit test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Unit test
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Unit test
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Unit test
The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Unit test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|