~taiite/public-inbox

protodump: Make prototypes names bold v1 APPLIED

Simon Ser: 1
 Make prototypes names bold

 1 files changed, 4 insertions(+), 12 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~taiite/public-inbox/patches/24354/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH protodump] Make prototypes names bold Export this patch

Instead of making the types bold, make the prototype names bold.
This makes it easier to tell the names apart.
---
 src/main.rs | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index 0d329a950ef8..edb88b88657b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -393,15 +393,12 @@ fn sort_prototypes(prototypes: Sources) -> SortedSources {
}

fn show_prototype(name: &str, prototype: &Prototype, color: bool) {
    print!("{}", prototype.return_type);
    if color {
        print!(
            "{}",
            ansi_term::Style::new().bold().paint(&prototype.return_type)
        );
        print!("{}(", ansi_term::Style::new().bold().paint(name));
    } else {
        print!("{}", prototype.return_type);
        print!("{}(", name);
    }
    print!("{}(", name);
    let mut first = true;
    for param in &prototype.parameters {
        if first {
@@ -414,12 +411,7 @@ fn show_prototype(name: &str, prototype: &Prototype, color: bool) {
        } else {
            &param.typ
        };
        if color {
            print!("{}", ansi_term::Style::new().bold().paint(&param.typ));
        } else {
            print!("{}", typ);
        }
        print!("{}", param.name);
        print!("{}{}", typ, param.name);
    }
    println!(");");
}
-- 
2.32.0
Indeed ! Thanks for the patch and for the feedback. Pushed