textwrap v0.7.0 Release Notes

Release Date: 2017-07-20 // over 3 years ago
  • ๐Ÿ”– Version 0.7.0 changes the return type of Wrapper::wrap from Vec<String> to Vec<Cow<'a, str>>. This means that the output lines ๐Ÿ’ฅ borrow data from the input string. This is a breaking API change if you relied on the exact return type of Wrapper::wrap. Callers of the ๐Ÿ‘€ textwrap::fill convenience function will see no breakage.

    The above change and other optimizations makes version 0.7.0 roughly 15-30% faster than version 0.6.0.

    ๐Ÿšš The squeeze_whitespace option has been removed since it was complicating the above optimization. Let us know if this option is โ†ช important for you so we can provide a work around.

    • ๐Ÿ›  Fixed [#58][issue-58]: Add a "fast_wrap" function.
    • ๐Ÿ›  Fixed [#61][issue-61]: Documentation errors.