Skip to content

Commit 9afb241

Browse files
committed
Use AddAssign impl
1 parent d32993a commit 9afb241

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_ast/src/util/comments.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ pub fn gather_comments(sm: &SourceMap, path: FileName, src: String) -> Vec<Comme
169169
if let Some(mut idx) = token_text.find('\n') {
170170
code_to_the_left = false;
171171
while let Some(next_newline) = &token_text[idx + 1..].find('\n') {
172-
idx = idx + 1 + next_newline;
172+
idx += 1 + next_newline;
173173
comments.push(Comment {
174174
style: CommentStyle::BlankLine,
175175
lines: vec![],

compiler/rustc_middle/src/util/common.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ where
3434
let rv = f();
3535
let duration = start.elapsed();
3636
let mut accu = accu.lock();
37-
*accu = *accu + duration;
37+
*accu += duration;
3838
rv
3939
}
4040

0 commit comments

Comments
 (0)