Skip to content

fix: avoid redundant borrow in generated code - #158

Open
satouriko wants to merge 1 commit into
influxdata:mainfrom
satouriko:fix/redundant-fields-borrow
Open

fix: avoid redundant borrow in generated code#158
satouriko wants to merge 1 commit into
influxdata:mainfrom
satouriko:fix/redundant-fields-borrow

Conversation

@satouriko

Copy link
Copy Markdown

Closes #157.

This removes the redundant borrow of the generated FIELDS slice in message and enum visitors. A regression test runs both generators and verifies that the emitted visitors format the slice directly.

Tests:

  • cargo test --workspace
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo +stable clippy --no-deps -p pbjson-test --all-targets -- -D warnings (Rust 1.97.1)
  • cargo fmt --all -- --check

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.

Generated code triggers clippy::useless_borrows_in_formatting

1 participant