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
Briefly describe the question, bug or feature request.
csv::Writer::write_field suggests to use write_record with empty iterator to terminate a record:
Note that if this API is used, write_record should be called with an empty iterator to write a record terminator.
However, using write_record this way requires a clumsy turbofish, as shown in the documentation:
wtr.write_record(None::<&[u8]>)?;
It is even more confusing if user tries to go the wtr.write_recrord::<?, ?>(...); route instead.
I suggest to add a dedicated method like terminate_record that is equivalent to write_record(None::<&[u8]>), then update documentation of write_field to use that method.
The text was updated successfully, but these errors were encountered:
I suppose, although the problem I have with this is that using write_field is already pretty niche, and I think I'm probably okay with having to write something a little annoying if what we get in return is one fewer method that could likely confused others and perhaps be called when it shouldn't be.
What version of the
csv
crate are you using?1.2.0
Briefly describe the question, bug or feature request.
csv::Writer::write_field
suggests to usewrite_record
with empty iterator to terminate a record:However, using
write_record
this way requires a clumsy turbofish, as shown in the documentation:It is even more confusing if user tries to go the
wtr.write_recrord::<?, ?>(...);
route instead.I suggest to add a dedicated method like
terminate_record
that is equivalent towrite_record(None::<&[u8]>)
, then update documentation ofwrite_field
to use that method.The text was updated successfully, but these errors were encountered: