From 9382afdb0d7258cee8e7f20d646a85076f38011a Mon Sep 17 00:00:00 2001 From: Aaqa Ishtyaq Date: Tue, 10 Jan 2023 22:23:38 +0530 Subject: fix(tvix/eval): address useless_format clippy warn This CL address clippy warnings related to use of 'format!' macro to return unmodified 'String'. Change-Id: I88726e59d8f39f6a455a8c1f48075b52d167e489 Signed-off-by: Aaqa Ishtyaq Reviewed-on: https://cl.tvl.fyi/c/depot/+/7804 Reviewed-by: flokli Tested-by: BuildkiteCI --- tvix/eval/src/warnings.rs | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'tvix') diff --git a/tvix/eval/src/warnings.rs b/tvix/eval/src/warnings.rs index 26efd24d1ed2..5395fc20b9c8 100644 --- a/tvix/eval/src/warnings.rs +++ b/tvix/eval/src/warnings.rs @@ -68,7 +68,8 @@ impl EvalWarning { } WarningKind::UselessInherit => { - format!("inherit does nothing (this variable already exists with the same value)") + "inherit does nothing (this variable already exists with the same value)" + .to_string() } WarningKind::UnusedBinding => { @@ -94,21 +95,13 @@ impl EvalWarning { format!("useless operation on boolean: {}", msg) } - WarningKind::DeadCode => { - format!("this code will never be executed") - } + WarningKind::DeadCode => "this code will never be executed".to_string(), - WarningKind::EmptyInherit => { - format!("this `inherit` statement is empty") - } + WarningKind::EmptyInherit => "this `inherit` statement is empty".to_string(), - WarningKind::EmptyLet => { - format!("this `let`-expression contains no bindings") - } + WarningKind::EmptyLet => "this `let`-expression contains no bindings".to_string(), - WarningKind::UselessParens => { - format!("these parenthesis can be removed") - } + WarningKind::UselessParens => "these parenthesis can be removed".to_string(), WarningKind::NotImplemented(what) => { format!("feature not yet implemented in tvix: {}", what) -- cgit 1.4.1