Skip to content

Commit

Permalink
Use AddAssign impl
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed Nov 9, 2021
1 parent d32993a commit 9afb241
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_ast/src/util/comments.rs
Expand Up @@ -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![],
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/util/common.rs
Expand Up @@ -34,7 +34,7 @@ where
let rv = f();
let duration = start.elapsed();
let mut accu = accu.lock();
*accu = *accu + duration;
*accu += duration;
rv
}

Expand Down

0 comments on commit 9afb241

Please sign in to comment.