You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The write!($dst, $args+) macro wraps a call to $dst.write_fmt(format_args!($($arg)*)) - making it ergonomic to use formatted output on anything "writable" -- write!(dst, "foo={foo}"). It seems serde does not support write! because it does not have write_fmt, even though it has almost identical collect_str. Even its documentation implies similar usage pattern.
Would it be possible to add another write_fmt fn to the Serializer to make this usecase easier? In theory, if collect_str was called write_fmt, it would have worked out of the box, so a default Trait impl to simply forward the call should be possible?
The text was updated successfully, but these errors were encountered:
The
write!($dst, $args+)
macro wraps a call to$dst.write_fmt(format_args!($($arg)*))
- making it ergonomic to use formatted output on anything "writable" --write!(dst, "foo={foo}")
. It seems serde does not supportwrite!
because it does not havewrite_fmt
, even though it has almost identical collect_str. Even its documentation implies similar usage pattern.Would it be possible to add another
write_fmt
fn to the Serializer to make this usecase easier? In theory, ifcollect_str
was calledwrite_fmt
, it would have worked out of the box, so a default Trait impl to simply forward the call should be possible?The text was updated successfully, but these errors were encountered: