mirror of
https://gitlab.com/arnekeller/ascii-table.git
synced 2024-12-04 21:49:08 +00:00
save game
This commit is contained in:
parent
dd590a9dfb
commit
967acfed9f
@ -385,7 +385,10 @@ impl SmartString {
|
||||
}
|
||||
|
||||
fn pop(&mut self) -> Option<char> {
|
||||
todo!()
|
||||
self.fragments.iter_mut()
|
||||
.filter(|(visible, string)| *visible && !string.is_empty())
|
||||
.last()
|
||||
.and_then(|(_, string)| string.pop())
|
||||
}
|
||||
|
||||
fn push(&mut self, ch: char) {
|
||||
|
@ -538,7 +538,7 @@ fn color_codes() {
|
||||
fn color_codes_in_header() {
|
||||
let mut config = AsciiTable::default();
|
||||
let text = "Hello".color(Color::Blue).bg_color(Color::Yellow).bold();
|
||||
config.columns.insert(0, Column {header: text, ..Column::default()});
|
||||
config.columns.insert(0, Column {header: text.to_string(), ..Column::default()});
|
||||
let input = vec![&[""]];
|
||||
let expected = "┌───────┐\n\
|
||||
│ \u{1b}[38;5;4m\u{1b}[48;5;3;1mHello\u{1b}[0m │\n\
|
||||
|
Loading…
Reference in New Issue
Block a user