From 6fbcfb58fc1fa8bafa1581b5155013099c56e086 Mon Sep 17 00:00:00 2001 From: o2sh Date: Wed, 23 Mar 2022 19:06:18 +0100 Subject: [PATCH] rename function in ascii_art --- src/ui/ascii_art.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui/ascii_art.rs b/src/ui/ascii_art.rs index 7c507d075..71f9fad6d 100644 --- a/src/ui/ascii_art.rs +++ b/src/ui/ascii_art.rs @@ -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) @@ -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 } @@ -195,7 +195,7 @@ fn succeed_when(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();