diff options
author | KNnut <9387720+KNnut@users.noreply.github.com> | 2020-11-09 22:38:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-09 15:38:29 +0100 |
commit | aaf7166a9d528636b11a2ad835238589bf650b6e (patch) | |
tree | ad209b2e48d0475a5ff65427ee3ca9a49c1c9851 /cli/diff.rs | |
parent | 8b7f5531ee1ccde897e87890e9aabc554fedb9dd (diff) |
refactor(cli): remove unnecessary format! calls (#8315)
Diffstat (limited to 'cli/diff.rs')
-rw-r--r-- | cli/diff.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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( |