From 28ea6aec4e6094dd21b0912c0c4184b599f3928a Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 14 Mar 2023 08:19:13 -0500 Subject: [PATCH 1/4] chore: Update Styled pattern --- src/color.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/color.rs b/src/color.rs index 0bc4fc5..7904da8 100644 --- a/src/color.rs +++ b/src/color.rs @@ -45,13 +45,10 @@ impl std::fmt::Display for Styled { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { if f.alternate() { - write!( - f, - "{}{}{}", - self.style.render(), - self.display, - self.style.render_reset() - ) + write!(f, "{}", self.style.render())?; + self.display.fmt(f)?; + write!(f, "{}", self.style.render_reset())?; + Ok(()) } else { self.display.fmt(f) } From db4dea445389d345e9032998c6a5753da024a1f6 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 16 Mar 2023 04:50:30 -0500 Subject: [PATCH 2/4] chore: Update to anstream --- Cargo.lock | 32 ++++++++++++++++---------------- Cargo.toml | 4 ++-- src/assert.rs | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bd7f153..e8ef296 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,21 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "anstream" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd0982309face56a044e935a18bbffcddeb1ce72e69a3ecc3bafb56d4e959f37" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-wincon", + "concolor-override", + "concolor-query", + "is-terminal", + "utf8parse", +] + [[package]] name = "anstyle" version = "0.3.1" @@ -17,21 +32,6 @@ dependencies = [ "utf8parse", ] -[[package]] -name = "anstyle-stream" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e72365ef034ed9e365d226f6194ae7afa8a7bedc70ca8ea00668b3cddd42fd2a" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-wincon", - "concolor-override", - "concolor-query", - "is-terminal", - "utf8parse", -] - [[package]] name = "anstyle-wincon" version = "0.2.0" @@ -46,8 +46,8 @@ dependencies = [ name = "assert_cmd" version = "2.0.9" dependencies = [ + "anstream", "anstyle", - "anstyle-stream", "bstr", "doc-comment", "escargot", diff --git a/Cargo.toml b/Cargo.toml index 1fddd54..c867ba0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ pre-release-replacements = [ ] [features] -color = ["dep:anstyle-stream", "predicates/color"] +color = ["dep:anstream", "predicates/color"] color-auto = ["color"] [[bin]] @@ -45,7 +45,7 @@ predicates-tree = "1.0.1" doc-comment = "0.3" wait-timeout = "0.2.0" bstr = "1.0.1" -anstyle-stream = { version = "0.2.1", optional = true } +anstream = { version = "0.2.2", optional = true } anstyle = "0.3.1" [dev-dependencies] diff --git a/src/assert.rs b/src/assert.rs index b167587..1779a70 100644 --- a/src/assert.rs +++ b/src/assert.rs @@ -7,7 +7,7 @@ use std::process; use std::str; #[cfg(feature = "color")] -use anstyle_stream::panic; +use anstream::panic; use predicates::str::PredicateStrExt; use predicates_tree::CaseTreeExt; From ab94f4d423c0e89a53eb8cbe7b3dd75d0f8a20f4 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 16 Mar 2023 04:57:28 -0500 Subject: [PATCH 3/4] docs: Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61c0dbc..8119a23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] - ReleaseDate +### Internal + +- Dependency update + ## [2.0.9] - 2023-03-14 ### Compatibility From e71a9f7b15596dd2aeea911bedbbd1859d84fa67 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 16 Mar 2023 04:57:33 -0500 Subject: [PATCH 4/4] chore: Release assert_cmd version 2.0.10 --- CHANGELOG.md | 5 ++++- Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8119a23..59f8a70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] - ReleaseDate +## [2.0.10] - 2023-03-16 + ### Internal - Dependency update @@ -304,7 +306,8 @@ Stable release! -[Unreleased]: https://github.com/assert-rs/assert_cmd/compare/v2.0.9...HEAD +[Unreleased]: https://github.com/assert-rs/assert_cmd/compare/v2.0.10...HEAD +[2.0.10]: https://github.com/assert-rs/assert_cmd/compare/v2.0.9...v2.0.10 [2.0.9]: https://github.com/assert-rs/assert_cmd/compare/v2.0.8...v2.0.9 [2.0.8]: https://github.com/assert-rs/assert_cmd/compare/v2.0.7...v2.0.8 [2.0.7]: https://github.com/assert-rs/assert_cmd/compare/v2.0.6...v2.0.7 diff --git a/Cargo.lock b/Cargo.lock index e8ef296..9a68fc8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,7 +44,7 @@ dependencies = [ [[package]] name = "assert_cmd" -version = "2.0.9" +version = "2.0.10" dependencies = [ "anstream", "anstyle", diff --git a/Cargo.toml b/Cargo.toml index c867ba0..d8b8419 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "assert_cmd" -version = "2.0.9" +version = "2.0.10" description = "Test CLI Applications." authors = ["Pascal Hertleif ", "Ed Page "] license = "MIT OR Apache-2.0"