Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'xtask/src/codegen.rs')
| -rw-r--r-- | xtask/src/codegen.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xtask/src/codegen.rs b/xtask/src/codegen.rs index acaa65129d..2491952f52 100644 --- a/xtask/src/codegen.rs +++ b/xtask/src/codegen.rs @@ -163,8 +163,9 @@ fn add_preamble(cg: CodegenType, mut text: String) -> String { /// case, updates the file and then fails the test. #[allow(clippy::print_stderr)] fn ensure_file_contents(cg: CodegenType, file: &Path, contents: &str, check: bool) { + let contents = normalize_newlines(contents); if let Ok(old_contents) = fs::read_to_string(file) { - if normalize_newlines(&old_contents) == normalize_newlines(contents) { + if normalize_newlines(&old_contents) == contents { // File is already up to date. return; } |