Skip to content

Commit

Permalink
Bless the target file instead of the source file
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemo157 authored and ytmimi committed Feb 9, 2024
1 parent ead0fc9 commit 8486837
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ fn handle_result(
// Ignore LF and CRLF difference for Windows.
if !string_eq_ignore_newline_repr(&fmt_text, &text) {
if std::env::var_os("RUSTC_BLESS").is_some_and(|v| v != "0") {
std::fs::write(file_name, fmt_text).unwrap();
std::fs::write(target, fmt_text).unwrap();
continue;
}
let diff = make_diff(&text, &fmt_text, DIFF_CONTEXT_SIZE);
Expand Down

0 comments on commit 8486837

Please sign in to comment.