Skip to content

Introduce #[cgp_impl] to simplify provider trait implementation #468

Introduce #[cgp_impl] to simplify provider trait implementation

Introduce #[cgp_impl] to simplify provider trait implementation #468

Triggered via pull request October 16, 2025 20:11
Status Failure
Total duration 52s
Artifacts

tests.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

7 errors and 12 warnings
this loop could be written as a `for` loop: crates/cgp-macro-lib/src/entrypoints/cgp_impl.rs#L167
error: this loop could be written as a `for` loop --> crates/cgp-macro-lib/src/entrypoints/cgp_impl.rs:167:5 | 167 | while let Some(tree) = token_iter.next() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for tree in token_iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator = note: `-D clippy::while-let-on-iterator` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::while_let_on_iterator)]`
this `if` statement can be collapsed: crates/cgp-macro-lib/src/entrypoints/cgp_impl.rs#L143
error: this `if` statement can be collapsed --> crates/cgp-macro-lib/src/entrypoints/cgp_impl.rs:143:9 | 143 | / if let ImplItem::Fn(item_fn) = item { 144 | | if let Some(arg) = item_fn.sig.inputs.first_mut() 145 | | && let FnArg::Receiver(receiver) = arg ... | 154 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if = note: `-D clippy::collapsible-if` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::collapsible_if)]` help: collapse nested if block | 143 ~ if let ImplItem::Fn(item_fn) = item 144 ~ && let Some(arg) = item_fn.sig.inputs.first_mut() 145 | && let FnArg::Receiver(receiver) = arg ... 152 | item_fn.block = parse2(replaced_block)?; 153 ~ } |
this loop could be written as a `for` loop: crates/cgp-macro-lib/src/entrypoints/cgp_impl.rs#L167
error: this loop could be written as a `for` loop --> crates/cgp-macro-lib/src/entrypoints/cgp_impl.rs:167:5 | 167 | while let Some(tree) = token_iter.next() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for tree in token_iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator = note: `-D clippy::while-let-on-iterator` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::while_let_on_iterator)]`
this `if` statement can be collapsed: crates/cgp-macro-lib/src/entrypoints/cgp_impl.rs#L143
error: this `if` statement can be collapsed --> crates/cgp-macro-lib/src/entrypoints/cgp_impl.rs:143:9 | 143 | / if let ImplItem::Fn(item_fn) = item { 144 | | if let Some(arg) = item_fn.sig.inputs.first_mut() 145 | | && let FnArg::Receiver(receiver) = arg ... | 154 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if = note: `-D clippy::collapsible-if` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::collapsible_if)]` help: collapse nested if block | 143 ~ if let ImplItem::Fn(item_fn) = item 144 ~ && let Some(arg) = item_fn.sig.inputs.first_mut() 145 | && let FnArg::Receiver(receiver) = arg ... 152 | item_fn.block = parse2(replaced_block)?; 153 ~ } |
matching on `Some` with `ok()` is redundant: crates/cgp-macro-lib/src/entrypoints/cgp_impl.rs#L96
error: matching on `Some` with `ok()` is redundant --> crates/cgp-macro-lib/src/entrypoints/cgp_impl.rs:96:23 | 96 | let context_var = if let Some(ident) = parse2::<Ident>(context_type.to_token_stream()).ok() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok = note: `-D clippy::match-result-ok` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::match_result_ok)]` help: consider matching on `Ok(ident)` and removing the call to `ok` instead | 96 - let context_var = if let Some(ident) = parse2::<Ident>(context_type.to_token_stream()).ok() { 96 + let context_var = if let Ok(ident) = parse2::<Ident>(context_type.to_token_stream()) { |
matching on `Some` with `ok()` is redundant: crates/cgp-macro-lib/src/entrypoints/cgp_impl.rs#L96
error: matching on `Some` with `ok()` is redundant --> crates/cgp-macro-lib/src/entrypoints/cgp_impl.rs:96:23 | 96 | let context_var = if let Some(ident) = parse2::<Ident>(context_type.to_token_stream()).ok() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_result_ok = note: `-D clippy::match-result-ok` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::match_result_ok)]` help: consider matching on `Ok(ident)` and removing the call to `ok` instead | 96 - let context_var = if let Some(ident) = parse2::<Ident>(context_type.to_token_stream()).ok() { 96 + let context_var = if let Ok(ident) = parse2::<Ident>(context_type.to_token_stream()) { |
clippy
Clippy had exited with the 101 exit code
fmt
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/
fmt
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/
fmt
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/
fmt
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
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
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
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
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/
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/
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/
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/
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/