From f7799e1474fcad718e3f290b8574bb3ad58b7e1c Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Wed, 19 Apr 2023 10:37:39 +0200 Subject: [PATCH] tui: Fix clippy warnings --- radicle-tui/src/ui.rs | 8 ++++---- radicle-tui/src/ui/cob/patch.rs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/radicle-tui/src/ui.rs b/radicle-tui/src/ui.rs index 02a68025..86fb6a1c 100644 --- a/radicle-tui/src/ui.rs +++ b/radicle-tui/src/ui.rs @@ -177,16 +177,16 @@ pub fn patch_context( let comments = patch::format_comments(patch); let context = label(" patch ").background(Color::Rgb(238, 111, 248)); - let id = label(&format!(" {} ", id)) + let id = label(&format!(" {id} ")) .foreground(Color::Rgb(117, 113, 249)) .background(Color::Rgb(40, 40, 40)); - let title = label(&format!(" {} ", title)) + let title = label(&format!(" {title} ")) .foreground(Color::Rgb(70, 70, 70)) .background(Color::Rgb(40, 40, 40)); - let author = label(&format!(" {} ", author)) + let author = label(&format!(" {author} ")) .foreground(Color::Rgb(117, 113, 249)) .background(Color::Rgb(40, 40, 40)); - let comments = label(&format!(" {} ", comments)) + let comments = label(&format!(" {comments} ")) .foreground(Color::Rgb(70, 70, 70)) .background(Color::Rgb(50, 50, 50)); diff --git a/radicle-tui/src/ui/cob/patch.rs b/radicle-tui/src/ui/cob/patch.rs index e95bc672..7d24aff6 100644 --- a/radicle-tui/src/ui/cob/patch.rs +++ b/radicle-tui/src/ui/cob/patch.rs @@ -28,9 +28,9 @@ pub fn format_author(patch: &Patch, profile: &Profile) -> String { let end = &author_did.to_human()[43..47]; if *author_did == profile.did() { - format!("did:key:{}...{} (you)", start, end) + format!("did:key:{start}...{end} (you)") } else { - format!("did:key:{}...{}", start, end) + format!("did:key:{start}...{end}") } } @@ -53,7 +53,7 @@ pub fn format_comments(patch: &Patch) -> String { Some((_, rev)) => rev.discussion().len(), None => 0, }; - format!("{}", count) + format!("{count}") } impl List for (PatchId, Patch) {