Skip to content

Commit

Permalink
rename function in ascii_art
Browse files Browse the repository at this point in the history
  • Loading branch information
o2sh committed Mar 23, 2022
1 parent 0b91af0 commit 6fbcfb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ui/ascii_art.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl<'a> Tokens<'a> {
colored_segment.push(chr);
}
Token::Color(col) => {
add_colored_segment(&mut whole_string, &colored_segment, *color, bold);
add_styled_segment(&mut whole_string, &colored_segment, *color, bold);
colored_segment = String::new();
color = colors
.get(col as usize)
Expand All @@ -177,7 +177,7 @@ impl<'a> Tokens<'a> {
};
});

add_colored_segment(&mut whole_string, &colored_segment, *color, bold);
add_styled_segment(&mut whole_string, &colored_segment, *color, bold);
(0..width).for_each(|_| whole_string.push(' '));
whole_string
}
Expand All @@ -195,7 +195,7 @@ fn succeed_when<I>(predicate: impl FnOnce(I) -> bool) -> impl FnOnce(I) -> Optio
}
}

fn add_colored_segment(base: &mut String, segment: &str, color: DynColors, bold: bool) {
fn add_styled_segment(base: &mut String, segment: &str, color: DynColors, bold: bool) {
let mut style = Style::new().color(color);
if bold {
style = style.bold();
Expand Down

0 comments on commit 6fbcfb5

Please sign in to comment.