Skip to content

Commit 83e2e2d

Browse files
authored
nits and typos
1 parent 32643dc commit 83e2e2d

File tree

1 file changed

+4
-3
lines changed
  • src/tools/miri/miri-script/src

1 file changed

+4
-3
lines changed

src/tools/miri/miri-script/src/util.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ impl MiriEnv {
148148

149149
/// Receives an iterator of files.
150150
/// Will format each file with the miri rustfmt config.
151-
/// Does not follow module relationships.
151+
/// Does not recursively format modules.
152152
pub fn format_files(
153153
&self,
154154
files: impl Iterator<Item = Result<PathBuf, walkdir::Error>>,
@@ -160,14 +160,15 @@ impl MiriEnv {
160160

161161
let mut first = true;
162162

163-
// Format in batches as not all out files fit into Windows' command argument limit.
163+
// Format in batches as not all our files fit into Windows' command argument limit.
164164
for batch in &files.chunks(256) {
165165
// Build base command.
166166
let mut cmd = cmd!(
167167
self.sh,
168168
"rustfmt +{toolchain} --edition=2021 --config-path {config_path} --unstable-features --skip-children {flags...}"
169169
);
170170
if first {
171+
// Log an abbreviating command, and only once.
171172
eprintln!("$ {cmd} ...");
172173
first = false;
173174
}
@@ -181,7 +182,7 @@ impl MiriEnv {
181182
cmd = cmd.arg(file);
182183
}
183184

184-
// Run commands.
185+
// Run rustfmt.
185186
// We want our own error message, repeating the command is too much.
186187
cmd.quiet().run().map_err(|_| anyhow!("`rustfmt` failed"))?;
187188
}

0 commit comments

Comments
 (0)