From 8c46c498d9a575576d8d8106269cb549830ccf30 Mon Sep 17 00:00:00 2001 From: Matthias Kaak Date: Thu, 10 Oct 2024 08:05:41 +0000 Subject: Improved wording of or_fun_call lint Signed-off-by: Matthias Kaak --- clippy_lints/src/methods/expect_fun_call.rs | 4 ++-- clippy_lints/src/methods/or_fun_call.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'clippy_lints/src/methods') diff --git a/clippy_lints/src/methods/expect_fun_call.rs b/clippy_lints/src/methods/expect_fun_call.rs index 2922086522c..c288dbdabe9 100644 --- a/clippy_lints/src/methods/expect_fun_call.rs +++ b/clippy_lints/src/methods/expect_fun_call.rs @@ -143,7 +143,7 @@ pub(super) fn check<'tcx>( cx, EXPECT_FUN_CALL, span_replace_word, - format!("use of `{name}` followed by a function call"), + format!("function call inside of `{name}`"), "try", format!("unwrap_or_else({closure_args} panic!({sugg}))"), applicability, @@ -161,7 +161,7 @@ pub(super) fn check<'tcx>( cx, EXPECT_FUN_CALL, span_replace_word, - format!("use of `{name}` followed by a function call"), + format!("function call inside of `{name}`"), "try", format!("unwrap_or_else({closure_args} {{ panic!(\"{{}}\", {arg_root_snippet}) }})"), applicability, diff --git a/clippy_lints/src/methods/or_fun_call.rs b/clippy_lints/src/methods/or_fun_call.rs index b971f60d416..9f456c5c599 100644 --- a/clippy_lints/src/methods/or_fun_call.rs +++ b/clippy_lints/src/methods/or_fun_call.rs @@ -183,7 +183,7 @@ pub(super) fn check<'tcx>( cx, OR_FUN_CALL, span_replace_word, - format!("use of `{name}` followed by a function call"), + format!("function call inside of `{name}`"), "try", format!("{name}_{suffix}({sugg})"), app, -- cgit 1.4.1-3-g733a5