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
F3369943: D12903.diff
Tue, Nov 26, 12:15 AM
Unknown Object (File)
Fri, Nov 22, 6:46 PM
Unknown Object (File)
Sun, Nov 10, 12:39 AM
Unknown Object (File)
Sat, Nov 9, 10:53 PM
Unknown Object (File)
Sat, Nov 9, 10:04 PM
Unknown Object (File)
Sat, Nov 9, 7:36 PM
Unknown Object (File)
Sat, Nov 9, 4:39 PM
Unknown Object (File)
Fri, Nov 8, 2:55 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
No Lint Coverage
Unit
No Test Coverage

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