Merge pull request #70 from mgeisler/release-0.7.0
Release 0.7.0
diff --git a/.appveyor.yml b/.appveyor.yml
index f2f9a91..7328785 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -1,4 +1,25 @@
environment:
+ # From https://github.com/rust-lang-nursery/rand/commit/bb78689:
+ #
+ # At the time this was added AppVeyor was having troubles with checking
+ # revocation of SSL certificates of sites like static.rust-lang.org and what
+ # we think is crates.io. The libcurl HTTP client by default checks for
+ # revocation on Windows and according to a mailing list [1] this can be
+ # disabled.
+ #
+ # The `CARGO_HTTP_CHECK_REVOKE` env var here tells cargo to disable SSL
+ # revocation checking on Windows in libcurl. Note, though, that rustup, which
+ # we're using to download Rust here, also uses libcurl as the default backend.
+ # Unlike Cargo, however, rustup doesn't have a mechanism to disable revocation
+ # checking. To get rustup working we set `RUSTUP_USE_HYPER` which forces it to
+ # use the Hyper instead of libcurl backend. Both Hyper and libcurl use
+ # schannel on Windows but it appears that Hyper configures it slightly
+ # differently such that revocation checking isn't turned on by default.
+ #
+ # [1]: https://curl.haxx.se/mail/lib-2016-03/0202.html
+ RUSTUP_USE_HYPER: 1
+ CARGO_HTTP_CHECK_REVOKE: false
+
matrix:
- TOOLCHAIN: stable
FEATURES: "hyphenation"
diff --git a/Cargo.toml b/Cargo.toml
index db83de1..ecdd763 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "textwrap"
-version = "0.6.0"
+version = "0.7.0"
authors = ["Martin Geisler <martin@geisler.net>"]
description = """
Textwrap is a small library for word wrapping, indenting, and
diff --git a/README.md b/README.md
index 758a7db..f06e4bd 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@
Add this to your `Cargo.toml`:
```toml
[dependencies]
-textwrap = "0.6"
+textwrap = "0.7"
```
and this to your crate root:
@@ -27,7 +27,7 @@
dependency as:
```toml
[dependencies]
-textwrap = { version: "0.6", features: ["hyphenation"] }
+textwrap = { version: "0.7", features: ["hyphenation"] }
```
## Documentation
@@ -173,6 +173,28 @@
This section lists the largest changes per release.
+### Version 0.7.0 — July 20th, 2017
+
+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.
+
+Issues closed:
+
+* Fixed [#58][issue-58]: Add a "fast_wrap" function that reuses the
+ input string
+
+* Fixed [#61][issue-61]: Documentation errors
+
### Version 0.6.0 — May 22nd, 2017
Version 0.6.0 adds builder methods to `Wrapper` for easy one-line
@@ -252,4 +274,6 @@
[issue-28]: ../../issues/28
[issue-36]: ../../issues/36
[issue-39]: ../../issues/39
+[issue-58]: ../../issues/58
+[issue-61]: ../../issues/61
[mit]: LICENSE