chiark / gitweb /
config derive: Switch to derive-deftly
Replace our bespoke proc_macro with a derive-deftly macro.
The macro is based on one written for derive-adhoc 0.0.1, so could do
with a bit of updating.
I've inspeccted the changes to the generated output with a semi-manual
diff. The only significant changes were changes to
`impl InspectableConfigAuto for InstanceConfig`, as follows:
> + "link" => &self.link,
This is case is handled by the manually-written
`impl InspectableConfig for InstanceConfig` so never reaches
the derived impl. But it is identical.
> + "max_batch_up" => &self.max_batch_up,
This seems to have been an omission in the previous code.
So the addition seems good.
> "max_clock_skew" => &self.max_clock_skew,
> - "max_clock_skew" => &self.max_clock_skew,
> - "ifname_server" => &self.ifname_server,
> "ifname_server" => &self.ifname_server,
This is the removal of two duplicates, which arose from the odd code
structure in the previous code, which does code gen for inspect_key
once per attribute, rather than once per field.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>