summary refs log tree commit diff
path: root/compiler/rustc_interface/src
diff options
context:
space:
mode:
authorJacob Kiesel <jake@bitcrafters.co>2024-10-02 00:49:46 -0600
committerJacob Kiesel <jake@bitcrafters.co>2024-10-02 00:49:46 -0600
commit58c5ac43aea5c94d61e3a7a4e8646e714230574d (patch)
tree97ddbcf1b8d43b0abcdb84f8e1f27c4e96f1eead /compiler/rustc_interface/src
parentb48c5f19e07c46d43d03328c86d3f7af6f9c8187 (diff)
downloadrust-58c5ac43aea5c94d61e3a7a4e8646e714230574d.tar.gz
rust-58c5ac43aea5c94d61e3a7a4e8646e714230574d.zip
restore prior more readable suggestion
Diffstat (limited to 'compiler/rustc_interface/src')
-rw-r--r--compiler/rustc_interface/src/passes.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs
index b9b65755db5..204ae437a3e 100644
--- a/compiler/rustc_interface/src/passes.rs
+++ b/compiler/rustc_interface/src/passes.rs
@@ -578,13 +578,14 @@ fn write_out_deps(tcx: TyCtxt<'_>, outputs: &OutputFilenames, out_filenames: &[P
             // If caller requested this information, add special comments about source file checksums.
             // These are not necessarily the same checksums as was used in the debug files.
             if sess.opts.unstable_opts.checksum_hash_algorithm().is_some() {
-                for (path, file_len, checksum_hash) in
-                    files.iter().filter_map(|(path, file_len, hash_algo)| {
+                files
+                    .iter()
+                    .filter_map(|(path, file_len, hash_algo)| {
                         hash_algo.map(|hash_algo| (path, file_len, hash_algo))
                     })
-                {
-                    writeln!(file, "# checksum:{checksum_hash} file_len:{file_len} {path}")?;
-                }
+                    .try_for_each(|(path, file_len, checksum_hash)| {
+                        writeln!(file, "# checksum:{checksum_hash} file_len:{file_len} {path}")
+                    })?;
             }
 
             Ok(())