diff options
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back/command.rs')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/command.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/command.rs b/compiler/rustc_codegen_ssa/src/back/command.rs index 383d0579e52..84252386041 100644 --- a/compiler/rustc_codegen_ssa/src/back/command.rs +++ b/compiler/rustc_codegen_ssa/src/back/command.rs @@ -166,7 +166,8 @@ impl Command { // [1]: https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa // [2]: https://devblogs.microsoft.com/oldnewthing/?p=41553 - let estimated_command_line_len = self.args.iter().map(|a| a.len()).sum::<usize>(); + let estimated_command_line_len = + self.args.iter().fold(0usize, |acc, a| acc.saturating_add(a.as_encoded_bytes().len())); estimated_command_line_len > 1024 * 6 } } |
