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 640c7ff commit 1b549ebCopy full SHA for 1b549eb
src/librustc_driver/profile/mod.rs
@@ -64,9 +64,7 @@ struct StackFrame {
64
}
65
66
fn total_duration(traces: &[trace::Rec]) -> Duration {
67
- let mut sum : Duration = Duration::new(0, 0);
68
- for t in traces.iter() { sum += t.dur_total; }
69
- return sum
+ Duration::new(0, 0) + traces.iter().map(|t| t.dur_total).sum()
70
71
72
// profiling thread; retains state (in local variables) and dump traces, upon request.
0 commit comments