Skip to content

Commit

Permalink
Merge pull request #36 from benesch/bump-strip-ansi-escapes
Browse files Browse the repository at this point in the history
Upgrade to latest strip-ansi-escapes version
  • Loading branch information
bachp authored Oct 23, 2023
2 parents b1e87aa + 53c7b6d commit 5c146ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ edition = "2021"
[dependencies]
derive-getters = "0.3.0"
quick-xml = "0.30.0"
strip-ansi-escapes = "0.1.0"
strip-ansi-escapes = "0.2.0"
time = { version = "0.3.4", features = ["formatting", "macros"] }

[dev-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions src/reports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,14 @@ impl TestCase {
|_| self.system_out.is_none() && self.system_err.is_none(),
|w| {
w.write_opt(self.system_out.as_ref(), |w, stdout| {
let data = strip_ansi_escapes::strip(stdout.as_str())?;
let data = strip_ansi_escapes::strip(stdout);
w.write_event(Event::CData(BytesCData::new(
String::from_utf8_lossy(&data),
)))
.map(|_| w)
})?
.write_opt(self.system_err.as_ref(), |w, stderr| {
let data = strip_ansi_escapes::strip(stderr.as_str())?;
let data = strip_ansi_escapes::strip(stderr);
w.write_event(Event::CData(BytesCData::new(
String::from_utf8_lossy(&data),
)))
Expand All @@ -170,14 +170,14 @@ impl TestCase {
|_| self.system_out.is_none() && self.system_err.is_none(),
|w| {
w.write_opt(self.system_out.as_ref(), |w, stdout| {
let data = strip_ansi_escapes::strip(stdout.as_str())?;
let data = strip_ansi_escapes::strip(stdout);
w.write_event(Event::CData(BytesCData::new(
String::from_utf8_lossy(&data),
)))
.map(|_| w)
})?
.write_opt(self.system_err.as_ref(), |w, stderr| {
let data = strip_ansi_escapes::strip(stderr.as_str())?;
let data = strip_ansi_escapes::strip(stderr);
w.write_event(Event::CData(BytesCData::new(
String::from_utf8_lossy(&data),
)))
Expand Down

0 comments on commit 5c146ce

Please sign in to comment.