]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/assertions_on_result_states.rs
Rollup merge of #102888 - GuillaumeGomez:improve-search-color-check, r=notriddle
[rust.git] / src / tools / clippy / clippy_lints / src / assertions_on_result_states.rs
index 656dc5feeb57029d3023de76251e8ef341d70ea2..f6d6c23bb6ed2a29803c4dad4313f906225cfd67 100644 (file)
@@ -69,9 +69,8 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) {
                         "called `assert!` with `Result::is_ok`",
                         "replace with",
                         format!(
-                            "{}.unwrap(){}",
-                            snippet_with_context(cx, recv.span, condition.span.ctxt(), "..", &mut app).0,
-                            semicolon
+                            "{}.unwrap(){semicolon}",
+                            snippet_with_context(cx, recv.span, condition.span.ctxt(), "..", &mut app).0
                         ),
                         app,
                     );
@@ -84,9 +83,8 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) {
                         "called `assert!` with `Result::is_err`",
                         "replace with",
                         format!(
-                            "{}.unwrap_err(){}",
-                            snippet_with_context(cx, recv.span, condition.span.ctxt(), "..", &mut app).0,
-                            semicolon
+                            "{}.unwrap_err(){semicolon}",
+                            snippet_with_context(cx, recv.span, condition.span.ctxt(), "..", &mut app).0
                         ),
                         app,
                     );