We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c857a2 commit fa4186cCopy full SHA for fa4186c
crates/volta-core/src/event.rs
@@ -102,9 +102,14 @@ impl EventLog {
102
103
pub fn add_event_start(&mut self, activity_kind: ActivityKind) {
104
let argv = env::args_os()
105
- .map(|arg| arg.to_string_lossy().to_string())
106
- .collect::<Vec<String>>()
107
- .join(" ");
+ .enumerate()
+ .fold(String::new(), |mut result, (i, arg)| {
+ if i > 0 {
108
+ result.push(' ');
109
+ }
110
+ result.push_str(&arg.to_string_lossy());
111
+ result
112
+ });
113
self.add_event(EventKind::Start { argv }, activity_kind)
114
}
115
pub fn add_event_end(&mut self, activity_kind: ActivityKind, exit_code: ExitCode) {
0 commit comments