Use BTreeSet #9
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 169 in crates/pdg-common/src/nft_metadata/generate.rs
github-actions / clippy
you seem to be trying to use `match` for an equality check. Consider using `if`
warning: you seem to be trying to use `match` for an equality check. Consider using `if`
--> crates/pdg-common/src/nft_metadata/generate.rs:153:9
|
153 | / match self.fx2 {
154 | | Fx2::Underwater => {
155 | | let jellyfish = FxJellyfish::seed();
156 | | self.fx_jellifish = jellyfish;
... |
168 | | _ => {}
169 | | }
| |_________^
|
= 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
|
153 ~ if self.fx2 == Fx2::Underwater {
154 + let jellyfish = FxJellyfish::seed();
155 + self.fx_jellifish = jellyfish;
156 +
157 + self.underwater_fog_amount = rand::random::<f64>() * 30.0;
158 + self.background_underwater_color_hue = 38.8;
159 +
160 + let env_light = if self.fx0 == Fx0::Hologram {
161 + EnvLight::UnderwaterHologram
162 + } else {
163 + EnvLight::Underwater
164 + };
165 + self.env_light = env_light;
166 + }
|
Check warning on line 318 in crates/pdg-common/src/nft_metadata/generate.rs
github-actions / clippy
function `add_new_effect_to_base` is never used
warning: function `add_new_effect_to_base` is never used
--> crates/pdg-common/src/nft_metadata/generate.rs:318:12
|
318 | fn add_new_effect_to_base(mut base: RenderParams, new_effect: &str) -> RenderParams {
| ^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 234 in crates/pdg-common/src/nft_metadata/generate.rs
github-actions / clippy
function `adjust_pose` is never used
warning: function `adjust_pose` is never used
--> crates/pdg-common/src/nft_metadata/generate.rs:234:12
|
234 | fn adjust_pose(poses: HashSet<Pose>, selected_pose: Pose) -> Option<Pose> {
| ^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 312 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: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
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, ×, &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 294 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:294:17
|
294 | 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 288 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:286:17
|
286 | / let res = self
287 | | .save_node_output(&id, &node_id, ×, &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, ×, &output)
288 + .await?;
|
Check warning on line 281 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:279:17
|
279 | / let res = self
280 | | .new_node_run(&id, &node_id, ×, &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, ×, &time, &input)
281 + .await?;
|
Check warning on line 274 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:274:17
|
274 | 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 268 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: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
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
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 204 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: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
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 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 204 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: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
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
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
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
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
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, ×, &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 294 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:294:17
|
294 | 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 288 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:286:17
|
286 | / let res = self
287 | | .save_node_output(&id, &node_id, ×, &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, ×, &output)
288 + .await?;
|
Check warning on line 281 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:279:17
|
279 | / let res = self
280 | | .new_node_run(&id, &node_id, ×, &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, ×, &time, &input)
281 + .await?;
|
Check warning on line 274 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:274:17
|
274 | 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