Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'xtask/src/codegen.rs')
| -rw-r--r-- | xtask/src/codegen.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xtask/src/codegen.rs b/xtask/src/codegen.rs index 19ca62e8a3..bc7eb88f3a 100644 --- a/xtask/src/codegen.rs +++ b/xtask/src/codegen.rs @@ -173,11 +173,11 @@ fn add_preamble(cg: CodegenType, mut text: String) -> String { #[allow(clippy::print_stderr)] fn ensure_file_contents(cg: CodegenType, file: &Path, contents: &str, check: bool) -> bool { let contents = normalize_newlines(contents); - if let Ok(old_contents) = fs::read_to_string(file) { - if normalize_newlines(&old_contents) == contents { - // File is already up to date. - return false; - } + if let Ok(old_contents) = fs::read_to_string(file) + && normalize_newlines(&old_contents) == contents + { + // File is already up to date. + return false; } let display_path = file.strip_prefix(project_root()).unwrap_or(file); |