~taiite/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH protodump] Make prototypes names bold

Details
Message ID
<ww7NHMQXSnhzrmYmLEyvtNXy9wM010QI3ZR1XPiizs@cp3-web-051.plabs.ch>
DKIM signature
pass
Download raw message
Patch: +4 -12
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
Details
Message ID
<20210813113340.559a233a@vroom.localdomain>
In-Reply-To
<ww7NHMQXSnhzrmYmLEyvtNXy9wM010QI3ZR1XPiizs@cp3-web-051.plabs.ch> (view parent)
DKIM signature
pass
Download raw message
Indeed ! Thanks for the patch and for the feedback. Pushed
Reply to thread Export thread (mbox)