Clippy in 1.80.0 alerted us to the fact that SerializeField was never
constructed (and due to its non-pub member, it can't be constructed
outside the tracing-serde crate where it's from).
Solution
This change fixes the definition to hold a reference to a Field, which
is what the other Serialize* types do. It also implements AsSerde
for this type and uses it inside the SerializeFieldSet type.
As a bonus, Clippy is now also happy that the type is constructed.
The example collector in the tracing-serde crate was also renamed from
JsonSubscriber to JsonCollector.
Motivation
Clippy in 1.80.0 alerted us to the fact that
SerializeField
was never constructed (and due to its non-pub
member, it can't be constructed outside thetracing-serde
crate where it's from).Solution
This change fixes the definition to hold a reference to a
Field
, which is what the otherSerialize*
types do. It also implementsAsSerde
for this type and uses it inside theSerializeFieldSet
type.As a bonus, Clippy is now also happy that the type is constructed.
The example collector in the
tracing-serde
crate was also renamed fromJsonSubscriber
toJsonCollector
.