~taiite/protodump

941d9dbf3bea58512a6a434ec32ef27f4fed0f0f — Simon Ser 2 months ago b12c931
Make prototypes names bold

Instead of making the types bold, make the prototype names bold.
This makes it easier to tell the names apart.
1 files changed, 4 insertions(+), 12 deletions(-)

M src/main.rs
M src/main.rs => src/main.rs +4 -12
@@ 379,15 379,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 {


@@ 400,12 397,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!(");");
}