Page MenuHomePhabricator

[util-macros] Improve TagAwareDeserialize to read serde attributes
ClosedPublic

Authored by bartek on Jul 28 2024, 7:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 6, 12:34 AM
Unknown Object (File)
Thu, Sep 5, 2:41 AM
Unknown Object (File)
Wed, Sep 4, 7:39 PM
Unknown Object (File)
Sun, Sep 1, 4:45 AM
Unknown Object (File)
Sun, Sep 1, 4:45 AM
Unknown Object (File)
Sun, Sep 1, 4:45 AM
Unknown Object (File)
Sun, Sep 1, 4:44 AM
Unknown Object (File)
Sun, Sep 1, 4:43 AM
Subscribers

Details

Summary

Some small improvements to the TagAwareDeserialize macro:

  • Verify if #[serde(remote = "Self", tag = "...")] is present
  • Allow any serde tag, not necessarily "type"

Depends on D12902

Test Plan

cargo test - Macro still works

Removing e.g. tag results in IDE (rust-analyzer) error:

Screenshot 2024-07-28 at 16.39.21.png (348×1 px, 115 KB)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Jul 28 2024, 8:11 AM
This revision is now accepted and ready to land.Jul 29 2024, 2:07 AM