Remove duplicated dependency on ansi-str 0.7 (#9641)

# Description
`tabled`/`papergrid` already use `ansi-str 0.8` while `nu-explore`
itself was still depending on `0.7`. Single fix necessary to adapt to
the new API.

cc @zhiburt

# User-Facing Changes
None
This commit is contained in:
Stefan Holderbach
2023-07-10 09:24:08 +02:00
committed by GitHub
parent 79a9751a58
commit 92354a817c
3 changed files with 5 additions and 14 deletions

View File

@ -24,5 +24,5 @@ terminal_size = "0.2"
strip-ansi-escapes = "0.1"
crossterm = "0.26"
ratatui = "0.20"
ansi-str = "0.7"
ansi-str = "0.8"
lscolors = { version = "0.14", default-features = false, features = ["nu-ansi-term"] }

View File

@ -69,7 +69,7 @@ fn cut_string(text: &str, area: Rect, skip: usize) -> Cow<'_, str> {
text
}
fn style_to_tui(style: ansi_str::Style) -> Style {
fn style_to_tui(style: &ansi_str::Style) -> Style {
let mut out = Style::default();
if let Some(clr) = style.background() {
out.bg = ansi_color_to_tui_color(clr);