Skip to content

Conversation

@nyurik
Copy link
Member

@nyurik nyurik commented Oct 21, 2025

No description provided.

Copilot AI review requested due to automatic review settings October 21, 2025 22:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements serialization optimization by skipping empty vector fields in YAML output. The change adds #[serde(skip_serializing_if = "Vec::is_empty")] attributes to vector fields across various structs in the DBC data model, reducing output verbosity when these collections contain no elements.

Key Changes:

  • Modified struct definitions to conditionally skip empty vectors during serialization
  • Updated snapshot tests to reflect the cleaner YAML output without empty vector fields

Reviewed Changes

Copilot reviewed 63 out of 63 changed files in this pull request and generated no comments.

File Description
src/lib.rs Added serde skip attributes to 20+ vector fields across Signal, MessageTransmitter, ValueTable, Message, EnvironmentVariable, ValueDescription, SignalGroups, and Dbc structs
tests/snapshots-dbc-cantools/*.snap Updated 50+ test snapshots to remove empty vector serialization lines, verifying the feature works correctly

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link

@amaraxmonika amaraxmonika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handy

@nyurik nyurik force-pushed the insta-skip-empty-vec branch from 3d3103f to a24e86e Compare October 23, 2025 05:20
@nyurik nyurik enabled auto-merge (squash) October 23, 2025 05:20
@nyurik nyurik merged commit a9c71ad into oxibus:main Oct 23, 2025
8 checks passed
@nyurik nyurik deleted the insta-skip-empty-vec branch October 23, 2025 05:21
@nyurik nyurik mentioned this pull request Oct 23, 2025
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.

2 participants