We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f7b4354 commit 79034bdCopy full SHA for 79034bd
compiler/rustc_codegen_ssa/src/back/command.rs
@@ -166,7 +166,8 @@ impl Command {
166
// [1]: https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa
167
// [2]: https://devblogs.microsoft.com/oldnewthing/?p=41553
168
169
- let estimated_command_line_len = self.args.iter().map(|a| a.len()).sum::<usize>();
+ let estimated_command_line_len =
170
+ self.args.iter().fold(0usize, |acc, a| acc.saturating_add(a.as_encoded_bytes().len()));
171
estimated_command_line_len > 1024 * 6
172
}
173
0 commit comments