Snap for 7280565 from 39187a39bfe11c4d2e96727c25f4432f4af984ee to sc-d1-release Change-Id: I271c5a611ba39c0e95456c73d71fe17d6abccd40
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 3e4b610..3237c3c 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@ { "git": { - "sha1": "ad143f1be460a4bab07a6ad5d0f408c1cbb50ac7" + "sha1": "c0a0db1a1460f8923f3cb8d8aa4366ce61237211" } }
diff --git a/CHANGELOG.md b/CHANGELOG.md index 05d22af..3d75e30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md
@@ -3,6 +3,16 @@ This file lists the most important changes made in each release of `textwrap`. +## Version 0.13.4 (2021-02-23) + +This release removes `println!` statements which was left behind in +`unfill` by mistake. + +* [#296](https://github.com/mgeisler/textwrap/pull/296): Improve house + building example with more comments. +* [#297](https://github.com/mgeisler/textwrap/pull/297): Remove debug + prints in the new `unfill` function. + ## Version 0.13.3 (2021-02-20) This release contains a bugfix for `indent` and improved handling of @@ -13,7 +23,9 @@ `core::display_width` to handle emojis when the unicode-width Cargo feature is disabled. * [#279](https://github.com/mgeisler/textwrap/pull/279): Make `indent` - preserve existing newlines in the input string. + preserve existing newlines in the input string. Before, + `indent("foo", "")` would return `"foo\n"` by mistake. It now + returns `"foo"` instead. * [#281](https://github.com/mgeisler/textwrap/pull/281): Ensure all `Options` fields have examples. * [#282](https://github.com/mgeisler/textwrap/pull/282): Add a
diff --git a/Cargo.toml b/Cargo.toml index b49a99e..61abe49 100644 --- a/Cargo.toml +++ b/Cargo.toml
@@ -13,7 +13,7 @@ [package] edition = "2018" name = "textwrap" -version = "0.13.3" +version = "0.13.4" authors = ["Martin Geisler <[email protected]>"] exclude = [".github/", ".gitignore", "benches/", "examples/", "fuzz/", "images/"] description = "Powerful library for word wrapping, indenting, and dedenting strings"
diff --git a/METADATA b/METADATA index 08130cc..dfad3bc 100644 --- a/METADATA +++ b/METADATA
@@ -7,13 +7,13 @@ } url { type: ARCHIVE - value: "https://static.crates.io/crates/textwrap/textwrap-0.13.3.crate" + value: "https://static.crates.io/crates/textwrap/textwrap-0.13.4.crate" } - version: "0.13.3" + version: "0.13.4" license_type: NOTICE last_upgrade_date { year: 2021 - month: 2 - day: 22 + month: 4 + day: 2 } }
diff --git a/TEST_MAPPING b/TEST_MAPPING index 661ac5c..a731acb 100644 --- a/TEST_MAPPING +++ b/TEST_MAPPING
@@ -2,16 +2,13 @@ { "presubmit": [ { - "name": "authfs_device_test_src_lib" - }, - { - "name": "vpnprofilestore_test" - }, - { "name": "keystore2_test" }, { "name": "libsqlite3-sys_device_test_src_lib" + }, + { + "name": "vpnprofilestore_test" } ] }
diff --git a/src/core.rs b/src/core.rs index dc00454..b6f5b46 100644 --- a/src/core.rs +++ b/src/core.rs
@@ -562,7 +562,7 @@ /// name: &'a str, /// hours: usize, // Time needed to complete task. /// sweep: usize, // Time needed for a quick sweep after task during the day. -/// cleanup: usize, // Time needed to cleanup after task at end of day. +/// cleanup: usize, // Time needed for full cleanup if day ends with this task. /// } /// /// impl Fragment for Task<'_> { @@ -584,9 +584,15 @@ /// Task { name: "Bathrooms", hours: 2, sweep: 1, cleanup: 2 }, /// ]; /// +/// // Fill tasks into days, taking `day_length` into account. The +/// // output shows the hours worked per day along with the names of +/// // the tasks for that day. /// fn assign_days<'a>(tasks: &[Task<'a>], day_length: usize) -> Vec<(usize, Vec<&'a str>)> { /// let mut days = Vec::new(); -/// for day in wrap_first_fit(&tasks, |i| day_length) { +/// // Assign tasks to days. The assignment is a vector of slices, +/// // with a slice per day. +/// let assigned_days: Vec<&[Task<'a>]> = wrap_first_fit(&tasks, |i| day_length); +/// for day in assigned_days.iter() { /// let last = day.last().unwrap(); /// let work_hours: usize = day.iter().map(|t| t.hours + t.sweep).sum(); /// let names = day.iter().map(|t| t.name).collect::<Vec<_>>();
diff --git a/src/lib.rs b/src/lib.rs index 1781b63..ee6d5d8 100644 --- a/src/lib.rs +++ b/src/lib.rs
@@ -124,7 +124,7 @@ //! The full dependency graph, where dashed lines indicate optional //! dependencies, is shown below: //! -//! <img src="https://raw.githubusercontent.com/mgeisler/textwrap/master/images/textwrap-0.13.3.svg"> +//! <img src="https://raw.githubusercontent.com/mgeisler/textwrap/master/images/textwrap-0.13.4.svg"> //! //! ## Default Features //! @@ -165,7 +165,7 @@ //! [terminal_size]: https://docs.rs/terminal_size/ //! [hyphenation]: https://docs.rs/hyphenation/ -#![doc(html_root_url = "https://docs.rs/textwrap/0.13.3")] +#![doc(html_root_url = "https://docs.rs/textwrap/0.13.4")] #![forbid(unsafe_code)] // See https://github.com/mgeisler/textwrap/issues/210 #![deny(missing_docs)] #![deny(missing_debug_implementations)] @@ -681,8 +681,6 @@ let without_prefix = line.trim_start_matches(prefix_chars); let prefix = &line[..line.len() - without_prefix.len()]; - println!("line: {:?} -> prefix: {:?}", line, prefix); - if idx == 0 { options.initial_indent = prefix; } else if idx == 1 { @@ -710,11 +708,7 @@ } } - println!("pushing trailing newlines: {:?}", &text[trimmed.len()..]); unfilled.push_str(&text[trimmed.len()..]); - - println!("unfilled: {:?}", unfilled); - (unfilled, options) }