Rollup merge of #90742 - est31:add_assign, r=davidtwco
Use AddAssign impl
This commit is contained in:
commit
0a9c1be100
@ -169,7 +169,7 @@ pub fn gather_comments(sm: &SourceMap, path: FileName, src: String) -> Vec<Comme
|
||||
if let Some(mut idx) = token_text.find('\n') {
|
||||
code_to_the_left = false;
|
||||
while let Some(next_newline) = &token_text[idx + 1..].find('\n') {
|
||||
idx = idx + 1 + next_newline;
|
||||
idx += 1 + next_newline;
|
||||
comments.push(Comment {
|
||||
style: CommentStyle::BlankLine,
|
||||
lines: vec![],
|
||||
|
@ -34,7 +34,7 @@ pub fn record_time<T, F>(accu: &Lock<Duration>, f: F) -> T
|
||||
let rv = f();
|
||||
let duration = start.elapsed();
|
||||
let mut accu = accu.lock();
|
||||
*accu = *accu + duration;
|
||||
*accu += duration;
|
||||
rv
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user