Bless the target file instead of the source file
This commit is contained in:
parent
ead0fc9529
commit
8486837d55
@ -835,7 +835,7 @@ fn handle_result(
|
|||||||
// Ignore LF and CRLF difference for Windows.
|
// Ignore LF and CRLF difference for Windows.
|
||||||
if !string_eq_ignore_newline_repr(&fmt_text, &text) {
|
if !string_eq_ignore_newline_repr(&fmt_text, &text) {
|
||||||
if std::env::var_os("RUSTC_BLESS").is_some_and(|v| v != "0") {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
let diff = make_diff(&text, &fmt_text, DIFF_CONTEXT_SIZE);
|
let diff = make_diff(&text, &fmt_text, DIFF_CONTEXT_SIZE);
|
||||||
|
Loading…
Reference in New Issue
Block a user