From ecd420636efe54657ae742ce960ce061740ef108 Mon Sep 17 00:00:00 2001 From: Alan Du Date: Mon, 3 Jun 2019 10:01:10 -0400 Subject: Fix clippy::single_match --- crates/ra_lsp_server/tests/heavy_tests/support.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crates/ra_lsp_server/tests') diff --git a/crates/ra_lsp_server/tests/heavy_tests/support.rs b/crates/ra_lsp_server/tests/heavy_tests/support.rs index f952a03a3..955d283dd 100644 --- a/crates/ra_lsp_server/tests/heavy_tests/support.rs +++ b/crates/ra_lsp_server/tests/heavy_tests/support.rs @@ -141,15 +141,14 @@ impl Server { R::Params: Serialize, { let actual = self.send_request::(params); - match find_mismatch(&expected_resp, &actual) { - Some((expected_part, actual_part)) => panic!( + if let Some((expected_part, actual_part)) = find_mismatch(&expected_resp, &actual) { + panic!( "JSON mismatch\nExpected:\n{}\nWas:\n{}\nExpected part:\n{}\nActual part:\n{}\n", to_string_pretty(&expected_resp).unwrap(), to_string_pretty(&actual).unwrap(), to_string_pretty(expected_part).unwrap(), to_string_pretty(actual_part).unwrap(), - ), - None => {} + ); } } -- cgit v1.2.3