Rollup merge of #90742 - est31:add_assign, r=davidtwco
Use AddAssign impl
This commit is contained in:
@@ -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') {
|
if let Some(mut idx) = token_text.find('\n') {
|
||||||
code_to_the_left = false;
|
code_to_the_left = false;
|
||||||
while let Some(next_newline) = &token_text[idx + 1..].find('\n') {
|
while let Some(next_newline) = &token_text[idx + 1..].find('\n') {
|
||||||
idx = idx + 1 + next_newline;
|
idx += 1 + next_newline;
|
||||||
comments.push(Comment {
|
comments.push(Comment {
|
||||||
style: CommentStyle::BlankLine,
|
style: CommentStyle::BlankLine,
|
||||||
lines: vec![],
|
lines: vec![],
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ where
|
|||||||
let rv = f();
|
let rv = f();
|
||||||
let duration = start.elapsed();
|
let duration = start.elapsed();
|
||||||
let mut accu = accu.lock();
|
let mut accu = accu.lock();
|
||||||
*accu = *accu + duration;
|
*accu += duration;
|
||||||
rv
|
rv
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user