Upgrade project to Rust 2024 edition #165
Annotations
3 errors and 20 warnings
|
verify-nix (ubuntu-latest)
Process completed with exit code 1.
|
|
verify-nix (macos-14)
The strategy configuration was canceled because "verify-nix.ubuntu-latest" failed
|
|
verify-nix (macos-14)
The operation was canceled.
|
|
this `if` statement can be collapsed:
crates/comfyui-api/src/comfy/mod.rs#L172
warning: this `if` statement can be collapsed
--> crates/comfyui-api/src/comfy/mod.rs:172:17
|
172 | / if data.node.is_none() {
173 | | if let Some(prompt_id) = data.prompt_id {
174 | | if prompt_id != target_prompt_id {
175 | | return Ok(None);
... |
196 | | }
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
172 ~ if data.node.is_none()
173 ~ && let Some(prompt_id) = data.prompt_id {
174 | if prompt_id != target_prompt_id {
...
194 | return Ok(Some(State::Finished(images)));
195 ~ }
|
|
|
doc list item overindented:
crates/stable-diffusion-api/src/img2img.rs#L261
warning: doc list item overindented
--> crates/stable-diffusion-api/src/img2img.rs:261:9
|
261 | /// Set to `-1` to randomize.
| ^^^^^^^^^^^^ help: try using ` ` (2 spaces)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
|
|
doc list item overindented:
crates/stable-diffusion-api/src/img2img.rs#L243
warning: doc list item overindented
--> crates/stable-diffusion-api/src/img2img.rs:243:9
|
243 | /// Set to `-1` to randomize.
| ^^^^^^^^^ help: try using ` ` (2 spaces)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
|
|
doc list item overindented:
crates/stable-diffusion-api/src/txt2img.rs#L177
warning: doc list item overindented
--> crates/stable-diffusion-api/src/txt2img.rs:177:9
|
177 | /// Set to `-1` to randomize.
| ^^^^^^^^^^^^ help: try using ` ` (2 spaces)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
|
|
doc list item overindented:
crates/stable-diffusion-api/src/txt2img.rs#L159
warning: doc list item overindented
--> crates/stable-diffusion-api/src/txt2img.rs:159:9
|
159 | /// Set to `-1` to randomize.
| ^^^^^^^^^ help: try using ` ` (2 spaces)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
= note: `#[warn(clippy::doc_overindented_list_items)]` on by default
|
|
this `if` statement can be collapsed:
crates/comfyui-api/src/comfy/getter.rs#L520
warning: this `if` statement can be collapsed
--> crates/comfyui-api/src/comfy/getter.rs:520:9
|
520 | / if let Some(node) = find_node::<SamplerCustom>(prompt, output_node) {
521 | | if let Ok(node) = prompt.get_typed_node(&node) as anyhow::Result<&SamplerCustom> {
522 | | return Some(node.negative.node_id.clone());
523 | | }
524 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
520 ~ if let Some(node) = find_node::<SamplerCustom>(prompt, output_node)
521 ~ && let Ok(node) = prompt.get_typed_node(&node) as anyhow::Result<&SamplerCustom> {
522 | return Some(node.negative.node_id.clone());
523 ~ }
|
|
|
this `if` statement can be collapsed:
crates/comfyui-api/src/comfy/getter.rs#L515
warning: this `if` statement can be collapsed
--> crates/comfyui-api/src/comfy/getter.rs:515:9
|
515 | / if let Some(node) = find_node::<KSampler>(prompt, output_node) {
516 | | if let Ok(node) = prompt.get_typed_node(&node) as anyhow::Result<&KSampler> {
517 | | return Some(node.negative.node_id.clone());
518 | | }
519 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
515 ~ if let Some(node) = find_node::<KSampler>(prompt, output_node)
516 ~ && let Ok(node) = prompt.get_typed_node(&node) as anyhow::Result<&KSampler> {
517 | return Some(node.negative.node_id.clone());
518 ~ }
|
|
|
this `if` statement can be collapsed:
crates/comfyui-api/src/comfy/getter.rs#L494
warning: this `if` statement can be collapsed
--> crates/comfyui-api/src/comfy/getter.rs:494:9
|
494 | / if let Some(node) = find_node::<SamplerCustom>(prompt, output_node) {
495 | | if let Ok(node) = prompt.get_typed_node(&node) as anyhow::Result<&SamplerCustom> {
496 | | return Some(node.positive.node_id.clone());
497 | | }
498 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
494 ~ if let Some(node) = find_node::<SamplerCustom>(prompt, output_node)
495 ~ && let Ok(node) = prompt.get_typed_node(&node) as anyhow::Result<&SamplerCustom> {
496 | return Some(node.positive.node_id.clone());
497 ~ }
|
|
|
this `if` statement can be collapsed:
crates/comfyui-api/src/comfy/getter.rs#L489
warning: this `if` statement can be collapsed
--> crates/comfyui-api/src/comfy/getter.rs:489:9
|
489 | / if let Some(node) = find_node::<KSampler>(prompt, output_node) {
490 | | if let Ok(node) = prompt.get_typed_node(&node) as anyhow::Result<&KSampler> {
491 | | return Some(node.positive.node_id.clone());
492 | | }
493 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `#[warn(clippy::collapsible_if)]` on by default
help: collapse nested if block
|
489 ~ if let Some(node) = find_node::<KSampler>(prompt, output_node)
490 ~ && let Ok(node) = prompt.get_typed_node(&node) as anyhow::Result<&KSampler> {
491 | return Some(node.positive.node_id.clone());
492 ~ }
|
|
|
methods `get_from`, `get_from_mut`, `get_node`, and `get_node_mut` are never used:
crates/comfyui-api/src/comfy/getter.rs#L273
warning: methods `get_from`, `get_from_mut`, `get_node`, and `get_node_mut` are never used
--> crates/comfyui-api/src/comfy/getter.rs:273:8
|
261 | trait GetterExt<T, N>
| --------- methods in this trait
...
273 | fn get_from<G>(&self, output_node: &str) -> anyhow::Result<&T>
| ^^^^^^^^
...
277 | fn get_from_mut<G>(&mut self, output_node: &str) -> anyhow::Result<&mut T>
| ^^^^^^^^^^^^
...
281 | fn get_node<G>(&self, node: &str) -> anyhow::Result<&T>
| ^^^^^^^^
...
285 | fn get_node_mut<G>(&mut self, node: &str) -> anyhow::Result<&mut T>
| ^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
|
non-local `impl` definition, `impl` blocks should be written at the same level as their item:
crates/comfyui-api/src/models/prompt.rs#L110
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
--> crates/comfyui-api/src/models/prompt.rs:110:1
|
110 | #[typetag::serde(tag = "class_type", content = "inputs")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| `Send` is not local
| `Sync` is not local
| `Serialize` is not local
| move the `impl` block outside of this constant `_Node_registry`
111 | pub trait Node: std::fmt::Debug + Send + Sync + AsAny + DynClone {
| ---- `Node` is not local
|
= note: the attribute macro `typetag::serde` defines the non-local `impl`, and may need to be changed
= note: the attribute macro `typetag::serde` may come from an old version of the `typetag_impl` crate, try updating your dependency with `cargo update -p typetag_impl`
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
= note: this warning originates in the attribute macro `typetag::serde` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
non-local `impl` definition, `impl` blocks should be written at the same level as their item:
crates/comfyui-api/src/models/prompt.rs#L110
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
--> crates/comfyui-api/src/models/prompt.rs:110:1
|
110 | #[typetag::serde(tag = "class_type", content = "inputs")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| `Sync` is not local
| `Serialize` is not local
| move the `impl` block outside of this constant `_Node_registry`
111 | pub trait Node: std::fmt::Debug + Send + Sync + AsAny + DynClone {
| ---- `Node` is not local
|
= note: the attribute macro `typetag::serde` defines the non-local `impl`, and may need to be changed
= note: the attribute macro `typetag::serde` may come from an old version of the `typetag_impl` crate, try updating your dependency with `cargo update -p typetag_impl`
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
= note: this warning originates in the attribute macro `typetag::serde` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
non-local `impl` definition, `impl` blocks should be written at the same level as their item:
crates/comfyui-api/src/models/prompt.rs#L110
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
--> crates/comfyui-api/src/models/prompt.rs:110:1
|
110 | #[typetag::serde(tag = "class_type", content = "inputs")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| `Send` is not local
| `Serialize` is not local
| move the `impl` block outside of this constant `_Node_registry`
111 | pub trait Node: std::fmt::Debug + Send + Sync + AsAny + DynClone {
| ---- `Node` is not local
|
= note: the attribute macro `typetag::serde` defines the non-local `impl`, and may need to be changed
= note: the attribute macro `typetag::serde` may come from an old version of the `typetag_impl` crate, try updating your dependency with `cargo update -p typetag_impl`
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
= note: this warning originates in the attribute macro `typetag::serde` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
non-local `impl` definition, `impl` blocks should be written at the same level as their item:
crates/comfyui-api/src/models/prompt.rs#L110
warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item
--> crates/comfyui-api/src/models/prompt.rs:110:1
|
110 | #[typetag::serde(tag = "class_type", content = "inputs")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| `Serialize` is not local
| move the `impl` block outside of this constant `_Node_registry`
111 | pub trait Node: std::fmt::Debug + Send + Sync + AsAny + DynClone {
| ---- `Node` is not local
|
= note: the attribute macro `typetag::serde` defines the non-local `impl`, and may need to be changed
= note: the attribute macro `typetag::serde` may come from an old version of the `typetag_impl` crate, try updating your dependency with `cargo update -p typetag_impl`
= note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`
= note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint
= note: `#[warn(non_local_definitions)]` on by default
= note: this warning originates in the attribute macro `typetag::serde` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
this `if` statement can be collapsed:
crates/comfyui-api/src/comfy/mod.rs#L172
warning: this `if` statement can be collapsed
--> crates/comfyui-api/src/comfy/mod.rs:172:17
|
172 | / if data.node.is_none() {
173 | | if let Some(prompt_id) = data.prompt_id {
174 | | if prompt_id != target_prompt_id {
175 | | return Ok(None);
... |
196 | | }
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
172 ~ if data.node.is_none()
173 ~ && let Some(prompt_id) = data.prompt_id {
174 | if prompt_id != target_prompt_id {
...
194 | return Ok(Some(State::Finished(images)));
195 ~ }
|
|
|
this `if` statement can be collapsed:
crates/comfyui-api/src/comfy/getter.rs#L520
warning: this `if` statement can be collapsed
--> crates/comfyui-api/src/comfy/getter.rs:520:9
|
520 | / if let Some(node) = find_node::<SamplerCustom>(prompt, output_node) {
521 | | if let Ok(node) = prompt.get_typed_node(&node) as anyhow::Result<&SamplerCustom> {
522 | | return Some(node.negative.node_id.clone());
523 | | }
524 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
520 ~ if let Some(node) = find_node::<SamplerCustom>(prompt, output_node)
521 ~ && let Ok(node) = prompt.get_typed_node(&node) as anyhow::Result<&SamplerCustom> {
522 | return Some(node.negative.node_id.clone());
523 ~ }
|
|
|
this `if` statement can be collapsed:
crates/comfyui-api/src/comfy/getter.rs#L515
warning: this `if` statement can be collapsed
--> crates/comfyui-api/src/comfy/getter.rs:515:9
|
515 | / if let Some(node) = find_node::<KSampler>(prompt, output_node) {
516 | | if let Ok(node) = prompt.get_typed_node(&node) as anyhow::Result<&KSampler> {
517 | | return Some(node.negative.node_id.clone());
518 | | }
519 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
515 ~ if let Some(node) = find_node::<KSampler>(prompt, output_node)
516 ~ && let Ok(node) = prompt.get_typed_node(&node) as anyhow::Result<&KSampler> {
517 | return Some(node.negative.node_id.clone());
518 ~ }
|
|
|
this `if` statement can be collapsed:
crates/comfyui-api/src/comfy/getter.rs#L494
warning: this `if` statement can be collapsed
--> crates/comfyui-api/src/comfy/getter.rs:494:9
|
494 | / if let Some(node) = find_node::<SamplerCustom>(prompt, output_node) {
495 | | if let Ok(node) = prompt.get_typed_node(&node) as anyhow::Result<&SamplerCustom> {
496 | | return Some(node.positive.node_id.clone());
497 | | }
498 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
494 ~ if let Some(node) = find_node::<SamplerCustom>(prompt, output_node)
495 ~ && let Ok(node) = prompt.get_typed_node(&node) as anyhow::Result<&SamplerCustom> {
496 | return Some(node.positive.node_id.clone());
497 ~ }
|
|
|
this `if` statement can be collapsed:
crates/comfyui-api/src/comfy/getter.rs#L489
warning: this `if` statement can be collapsed
--> crates/comfyui-api/src/comfy/getter.rs:489:9
|
489 | / if let Some(node) = find_node::<KSampler>(prompt, output_node) {
490 | | if let Ok(node) = prompt.get_typed_node(&node) as anyhow::Result<&KSampler> {
491 | | return Some(node.positive.node_id.clone());
492 | | }
493 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `#[warn(clippy::collapsible_if)]` on by default
help: collapse nested if block
|
489 ~ if let Some(node) = find_node::<KSampler>(prompt, output_node)
490 ~ && let Ok(node) = prompt.get_typed_node(&node) as anyhow::Result<&KSampler> {
491 | return Some(node.positive.node_id.clone());
492 ~ }
|
|
|
methods `get_from`, `get_from_mut`, `get_node`, and `get_node_mut` are never used:
crates/comfyui-api/src/comfy/getter.rs#L273
warning: methods `get_from`, `get_from_mut`, `get_node`, and `get_node_mut` are never used
--> crates/comfyui-api/src/comfy/getter.rs:273:8
|
261 | trait GetterExt<T, N>
| --------- methods in this trait
...
273 | fn get_from<G>(&self, output_node: &str) -> anyhow::Result<&T>
| ^^^^^^^^
...
277 | fn get_from_mut<G>(&mut self, output_node: &str) -> anyhow::Result<&mut T>
| ^^^^^^^^^^^^
...
281 | fn get_node<G>(&self, node: &str) -> anyhow::Result<&T>
| ^^^^^^^^
...
285 | fn get_node_mut<G>(&mut self, node: &str) -> anyhow::Result<&mut T>
| ^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|