Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
tui: Fix clippy warnings
Alexis Sellier committed 3 years ago
commit f7799e1474fcad718e3f290b8574bb3ad58b7e1c
parent d79e97cf3b86c0816904bfe41642af0238b33dfd
2 files changed +7 -7
modified 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));

modified 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) {