Skip to content

style(clippy): use struct update syntax in create_work_item test - #1961

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
clippy-fixer/field-reassign-with-default-20260820-a734e2cc81ca7c3c
Draft

style(clippy): use struct update syntax in create_work_item test#1961
github-actions[bot] wants to merge 1 commit into
mainfrom
clippy-fixer/field-reassign-with-default-20260820-a734e2cc81ca7c3c

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What clippy found

error: field assignment outside of initializer for an instance created with Default::default()
   --> src/safe_outputs/create_work_item.rs:991:9
    |
991 |         config.description_field = Some(AdoWorkItemFieldRef::parse("System.Title").unwrap());
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: `-D clippy::field-reassign-with-default` implied by `-D warnings`

How it was fixed

clippy::field_reassign_with_default in
test_patch_field_validation_rejects_description_field_title_collision
(src/safe_outputs/create_work_item.rs). Replaced the
let mut config = CreateWorkItemConfig::default(); config.description_field = ...;
pattern with struct-update syntax:
CreateWorkItemConfig { description_field: Some(...), ..Default::default() }.

Verification

  • cargo build --all-targets — pass
  • cargo test — pass (full suite)
  • cargo clippy --all-targets --all-features --workspace -- -D warnings — exits 0, no warnings

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • spsprodeus21.vssps.visualstudio.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "spsprodeus21.vssps.visualstudio.com"

See Network Configuration for more information.

Generated by Clippy Fixer · auto · 39.8 AIC · ⌖ 5.82 AIC · ⊞ 13.1K ·

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants