From aaf7166a9d528636b11a2ad835238589bf650b6e Mon Sep 17 00:00:00 2001 From: KNnut <9387720+KNnut@users.noreply.github.com> Date: Mon, 9 Nov 2020 22:38:29 +0800 Subject: refactor(cli): remove unnecessary format! calls (#8315) --- cli/diff.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cli/diff.rs') diff --git a/cli/diff.rs b/cli/diff.rs index 7510ebfa9..c8a86736d 100644 --- a/cli/diff.rs +++ b/cli/diff.rs @@ -6,27 +6,27 @@ use std::fmt; use std::fmt::Write; fn fmt_add() -> String { - format!("{}", colors::green_bold("+")) + colors::green_bold("+").to_string() } fn fmt_add_text(x: &str) -> String { - format!("{}", colors::green(x)) + colors::green(x).to_string() } fn fmt_add_text_highlight(x: &str) -> String { - format!("{}", colors::black_on_green(x)) + colors::black_on_green(x).to_string() } fn fmt_rem() -> String { - format!("{}", colors::red_bold("-")) + colors::red_bold("-").to_string() } fn fmt_rem_text(x: &str) -> String { - format!("{}", colors::red(x)) + colors::red(x).to_string() } fn fmt_rem_text_highlight(x: &str) -> String { - format!("{}", colors::white_on_red(x)) + colors::white_on_red(x).to_string() } fn write_line_diff( -- cgit v1.2.3