Lucretiel / joinery

A Rust library for generically joining iterables with a separator
MIT License
91 stars 8 forks source link

No example for Join::consume_fmt #23

Closed L-as closed 5 years ago

L-as commented 5 years ago

Join::consume_fmt has no examples in its documentation, and I can't find a way to actually use it myself.

Lucretiel commented 5 years ago

I actually don't think there's any practical use for it; it's an implementation helper for Display::fmt. I added it to the public interface, because I thought it might come in handy, but the only time you ever have a Formatter is inside of Display::fmt, and it's pretty rare to be in that context AND have a Join which can be consumed via self.

This is partially why the method is going away in the upcoming 2.0.0 release, since I slightly redesigned the type model for the library to be less dependent on clone. For now, consider it deprecated; I'll publish 1.2.3 this week with an official deprecation warning.

Lucretiel commented 5 years ago

Now that consume_fmt has been removed in joinery 2.X, I'm closing this issue. Thanks for the feedback!