Skip to content

Commit

Permalink
Update clippy_lints/src/loops.rs
Browse files Browse the repository at this point in the history
Fix NITs

Co-authored-by: Philipp Krones <[email protected]>
  • Loading branch information
josephlr and flip1995 authored Nov 4, 2020
1 parent c39386a commit 1991c56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/loops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -547,9 +547,9 @@ impl<'tcx> LateLintPass<'tcx> for Loops {
if block.stmts.is_empty() && block.expr.is_none() && !is_in_panic_handler(cx, expr) {
let msg = "empty `loop {}` wastes CPU cycles";
let help = if is_no_std_crate(cx.tcx.hir().krate()) {
"You should either use `panic!()` or add a call pausing or sleeping the thread to the loop body."
"you should either use `panic!()` or add a call pausing or sleeping the thread to the loop body"
} else {
"You should either use `panic!()` or add `std::thread::sleep(..);` to the loop body."
"you should either use `panic!()` or add `std::thread::sleep(..);` to the loop body"
};
span_lint_and_help(cx, EMPTY_LOOP, expr.span, msg, None, help);
}
Expand Down

0 comments on commit 1991c56

Please sign in to comment.