diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
commit | ef24de24a82fe681581cc130f342363c47c0969a (patch) | |
tree | 0d494f7e1a38b95c92426f58fe6eaa877303a86c /vendor/snapbox | |
parent | Releasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip |
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/snapbox')
-rw-r--r-- | vendor/snapbox/.cargo-checksum.json | 2 | ||||
-rw-r--r-- | vendor/snapbox/Cargo.lock | 2 | ||||
-rw-r--r-- | vendor/snapbox/Cargo.toml | 2 | ||||
-rw-r--r-- | vendor/snapbox/src/report/diff.rs | 31 |
4 files changed, 22 insertions, 15 deletions
diff --git a/vendor/snapbox/.cargo-checksum.json b/vendor/snapbox/.cargo-checksum.json index e3e324dee..44bc858a4 100644 --- a/vendor/snapbox/.cargo-checksum.json +++ b/vendor/snapbox/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.lock":"dabf058307b37fa39652cea5da44b18818fb4b08daf1d5488f778036865ecd86","Cargo.toml":"a63174d5bff2bfb8ea394cf4a0b5ea1b219bf10d58625a17d58c282a1c1b5e85","LICENSE-APACHE":"c6596eb7be8581c18be736c846fb9173b69eccf6ef94c5135893ec56bd92ba08","LICENSE-MIT":"6efb0476a1cc085077ed49357026d8c173bf33017278ef440f222fb9cbcb66e6","README.md":"8ae45cfbc76984049c97e7bdee5e0a6709f2bff442895e0c08701a71338aa0f9","examples/snap-example-fixture.rs":"794ba42841b44bed6a274cfad05b47b2882a30e925b49e010af85e9cb348a035","src/action.rs":"a451e85e74fe43b5162a144927151e3785ef36c8d67f16f6ec3da3c6f371ca12","src/assert.rs":"2fe76edef1fd05a8eadfa6e8a6b1dce8629b6e4f1fd4ce85d98b1a51eafacac4","src/bin/snap-fixture.rs":"794ba42841b44bed6a274cfad05b47b2882a30e925b49e010af85e9cb348a035","src/cmd.rs":"348b5072f898db38dc83eb01a83463e0f523ef9bf78e73edb6517be089cfd70c","src/data.rs":"a28fb56fc40eb8f139a75a7dec0086b22603f93663631cab6deea5418d57865b","src/error.rs":"ed67eaa4e134937e1f014a0f5555985d26a021bd7034e2928ff3e46f73d7834a","src/harness.rs":"1035e9cca946671c8ccf1604e549355308859a43938b35a8c0d1aa452448d146","src/lib.rs":"e705d54d878ccfd88f020b97d6a6b6868d9db04f2dec8e04f1b39d372b8d20d4","src/path.rs":"d1ed8f92ed8fd42a44d18bfead92ba40e1e3b73e3ac474ad7e85606f7bc8c20a","src/report/color.rs":"721e50e3d4fa4b7a0f2b1f32f86b70ba886e5dba18251b26c6fde45981d205fd","src/report/diff.rs":"5821817a6729084e8eb48818b5c3fccbdcbe48b35842d101ff33c4b8208c13c6","src/report/mod.rs":"84bd389fff126b5a22790865417c3b8942cced343d56659ad9f8b568e3d62902","src/substitutions.rs":"2c2433e6290b40c64f3e508625c4ed1229f01aaa5ccb8add09cbee2fe84b1ae2","src/utils/lines.rs":"9a8eff80b4eced8042cecd2a5bf689365a9ceeea8b4239dcee22a6daad2522ec","src/utils/mod.rs":"61e6a1c2bbefa33a7f8af4068a42a7ad31bfefa90803610374f28be4a2f3b9c3"},"package":"7b439536a42c43be148b610c7f7f968fb79a457254910a9cb20900da73cd3271"}
\ No newline at end of file +{"files":{"Cargo.lock":"8e062e31566ee546c6753973e1212950aca0c000b2c96d17daf3abe0eea22bf4","Cargo.toml":"40c31aff9213e45bb3bb494e9b71bca937a06cc2b2987ccee1175e95c7ebb46d","LICENSE-APACHE":"c6596eb7be8581c18be736c846fb9173b69eccf6ef94c5135893ec56bd92ba08","LICENSE-MIT":"6efb0476a1cc085077ed49357026d8c173bf33017278ef440f222fb9cbcb66e6","README.md":"8ae45cfbc76984049c97e7bdee5e0a6709f2bff442895e0c08701a71338aa0f9","examples/snap-example-fixture.rs":"794ba42841b44bed6a274cfad05b47b2882a30e925b49e010af85e9cb348a035","src/action.rs":"a451e85e74fe43b5162a144927151e3785ef36c8d67f16f6ec3da3c6f371ca12","src/assert.rs":"2fe76edef1fd05a8eadfa6e8a6b1dce8629b6e4f1fd4ce85d98b1a51eafacac4","src/bin/snap-fixture.rs":"794ba42841b44bed6a274cfad05b47b2882a30e925b49e010af85e9cb348a035","src/cmd.rs":"348b5072f898db38dc83eb01a83463e0f523ef9bf78e73edb6517be089cfd70c","src/data.rs":"a28fb56fc40eb8f139a75a7dec0086b22603f93663631cab6deea5418d57865b","src/error.rs":"ed67eaa4e134937e1f014a0f5555985d26a021bd7034e2928ff3e46f73d7834a","src/harness.rs":"1035e9cca946671c8ccf1604e549355308859a43938b35a8c0d1aa452448d146","src/lib.rs":"e705d54d878ccfd88f020b97d6a6b6868d9db04f2dec8e04f1b39d372b8d20d4","src/path.rs":"d1ed8f92ed8fd42a44d18bfead92ba40e1e3b73e3ac474ad7e85606f7bc8c20a","src/report/color.rs":"721e50e3d4fa4b7a0f2b1f32f86b70ba886e5dba18251b26c6fde45981d205fd","src/report/diff.rs":"84a812be5d6cc99d37b874552138e8bccfa5a8ebe0a07671baefeb1425df5e3c","src/report/mod.rs":"84bd389fff126b5a22790865417c3b8942cced343d56659ad9f8b568e3d62902","src/substitutions.rs":"2c2433e6290b40c64f3e508625c4ed1229f01aaa5ccb8add09cbee2fe84b1ae2","src/utils/lines.rs":"9a8eff80b4eced8042cecd2a5bf689365a9ceeea8b4239dcee22a6daad2522ec","src/utils/mod.rs":"61e6a1c2bbefa33a7f8af4068a42a7ad31bfefa90803610374f28be4a2f3b9c3"},"package":"4b377c0b6e4715c116473d8e40d51e3fa5b0a2297ca9b2a931ba800667b259ed"}
\ No newline at end of file diff --git a/vendor/snapbox/Cargo.lock b/vendor/snapbox/Cargo.lock index a1e32543c..184963e5c 100644 --- a/vendor/snapbox/Cargo.lock +++ b/vendor/snapbox/Cargo.lock @@ -602,7 +602,7 @@ checksum = "62ac7f900db32bf3fd12e0117dd3dc4da74bc52ebaac97f39668446d89694803" [[package]] name = "snapbox" -version = "0.4.13" +version = "0.4.14" dependencies = [ "anstream", "anstyle", diff --git a/vendor/snapbox/Cargo.toml b/vendor/snapbox/Cargo.toml index 4e8005c6b..2cb92d692 100644 --- a/vendor/snapbox/Cargo.toml +++ b/vendor/snapbox/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.70.0" name = "snapbox" -version = "0.4.13" +version = "0.4.14" include = [ "build.rs", "src/**/*", diff --git a/vendor/snapbox/src/report/diff.rs b/vendor/snapbox/src/report/diff.rs index 67f6810b5..b980733bb 100644 --- a/vendor/snapbox/src/report/diff.rs +++ b/vendor/snapbox/src/report/diff.rs @@ -25,17 +25,17 @@ pub fn write_diff( if !rendered { if let Some(expected_name) = expected_name { - writeln!(writer, "{} {}:", expected_name, palette.info("(expected)"))?; + writeln!(writer, "{} {}:", expected_name, palette.error("(expected)"))?; } else { - writeln!(writer, "{}:", palette.info("Expected"))?; + writeln!(writer, "{}:", palette.error("Expected"))?; } - writeln!(writer, "{}", palette.info(&expected))?; + writeln!(writer, "{}", palette.error(&expected))?; if let Some(actual_name) = actual_name { - writeln!(writer, "{} {}:", actual_name, palette.error("(actual)"))?; + writeln!(writer, "{} {}:", actual_name, palette.info("(actual)"))?; } else { - writeln!(writer, "{}:", palette.error("Actual"))?; + writeln!(writer, "{}:", palette.info("Actual"))?; } - writeln!(writer, "{}", palette.error(&actual))?; + writeln!(writer, "{}", palette.info(&actual))?; } Ok(()) } @@ -64,19 +64,19 @@ fn write_diff_inner( writeln!( writer, "{}", - palette.info(format_args!("{:->4} expected: {}", "", expected_name)) + palette.error(format_args!("{:->4} expected: {}", "", expected_name)) )?; } else { - writeln!(writer, "{}", palette.info(format_args!("--- Expected")))?; + writeln!(writer, "{}", palette.error(format_args!("--- Expected")))?; } if let Some(actual_name) = actual_name { writeln!( writer, "{}", - palette.error(format_args!("{:+>4} actual: {}", "", actual_name)) + palette.info(format_args!("{:+>4} actual: {}", "", actual_name)) )?; } else { - writeln!(writer, "{}", palette.error(format_args!("+++ Actual")))?; + writeln!(writer, "{}", palette.info(format_args!("+++ Actual")))?; } let changes = changes .ops() @@ -137,10 +137,17 @@ fn write_diff_inner( elided = false; match change.tag() { similar::ChangeTag::Insert => { - write_change(writer, change, "+", palette.actual, palette.error, palette)?; + write_change(writer, change, "+", palette.actual, palette.info, palette)?; } similar::ChangeTag::Delete => { - write_change(writer, change, "-", palette.expected, palette.info, palette)?; + write_change( + writer, + change, + "-", + palette.expected, + palette.error, + palette, + )?; } similar::ChangeTag::Equal => { write_change(writer, change, "|", palette.hint, palette.hint, palette)?; |