Skip to content

Commit 3594fdd

Browse files
authored
Merge pull request #36 from knrafto/fg-colors
2 parents 9d2aa5d + 4a0dd62 commit 3594fdd

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 1.4.1
2+
3+
* Use foreground colors instead of background colors to highlight diffs ([#36])
4+
15
# 1.4.0
26

37
* Prefer `CARGO_WORKSPACE_DIR` if set, use heuristic as fallback to find cargo workspace ([#34])
@@ -17,6 +21,7 @@
1721

1822
* No changelog until this point :-(
1923

24+
[#36]: https://github.com/rust-analyzer/expect-test/pull/36
2025
[#34]: https://github.com/rust-analyzer/expect-test/pull/34
2126
[#31]: https://github.com/rust-analyzer/expect-test/pull/31
2227
[#27]: https://github.com/rust-analyzer/expect-test/pull/27

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "expect-test"
3-
version = "1.4.0"
3+
version = "1.4.1"
44
description = "Minimalistic snapshot testing library"
55
keywords = ["snapshot", "testing", "expect"]
66
categories = ["development-tools::testing"]

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,8 +719,8 @@ fn format_chunks(chunks: Vec<dissimilar::Chunk>) -> String {
719719
for chunk in chunks {
720720
let formatted = match chunk {
721721
dissimilar::Chunk::Equal(text) => text.into(),
722-
dissimilar::Chunk::Delete(text) => format!("\x1b[41m{}\x1b[0m", text),
723-
dissimilar::Chunk::Insert(text) => format!("\x1b[42m{}\x1b[0m", text),
722+
dissimilar::Chunk::Delete(text) => format!("\x1b[4m\x1b[31m{}\x1b[0m", text),
723+
dissimilar::Chunk::Insert(text) => format!("\x1b[4m\x1b[32m{}\x1b[0m", text),
724724
};
725725
buf.push_str(&formatted);
726726
}

xtask/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::env;
22

33
use xaction::{cargo_toml, cmd, git, push_rustup_toolchain, section, Result};
44

5-
const MSRV: &str = "1.45.0";
5+
const MSRV: &str = "1.56.0";
66

77
fn main() {
88
if let Err(err) = try_main() {

0 commit comments

Comments
 (0)