update various dependencies

- update dirs from v4 to v5 (no code changes)
- update term_grid from v0.1 to v0.2 (small code changes)
- update terminal_size from v0.1 to v0.3 (no code changes)
- update lscolors from v0.15 to v0.16 (no code changes)
- update serde_yaml from v0.8 to v0.9 (no code changes)

The term_grid update required small changes to the use of
`term_grid::Cell` because with v0.2, it is possible to specify the
alignment within the cell. Adding `Alignment::Left` should preserve
the current behaviour.

This commit also includes the changes generated by "cargo update",
which seems not to have been run in a long time, causing very old
versions to be pulled in.
This commit is contained in:
Fabio Valentini
2024-02-05 13:53:46 +01:00
committed by Wei Zhang
parent 73eeb7f717
commit 0d2e36ac99
5 changed files with 553 additions and 537 deletions

View File

@@ -6,7 +6,7 @@ use crate::icon::Icons;
use crate::meta::name::DisplayOption;
use crate::meta::{FileType, Meta};
use std::collections::HashMap;
use term_grid::{Cell, Direction, Filling, Grid, GridOptions};
use term_grid::{Alignment, Cell, Direction, Filling, Grid, GridOptions};
use terminal_size::terminal_size;
use unicode_width::UnicodeWidthStr;
@@ -130,6 +130,7 @@ fn inner_display_grid(
cells.push(Cell {
width: get_visible_width(&block, flags.hyperlink == HyperlinkOption::Always),
contents: block,
alignment: Alignment::Left,
});
}
}
@@ -216,6 +217,7 @@ fn add_header(flags: &Flags, cells: &[Cell], grid: &mut Grid) {
grid.add(Cell {
width: widths[idx],
contents: underlined_header,
alignment: Alignment::Left,
});
}
}
@@ -259,6 +261,7 @@ fn inner_display_tree(
cells.push(Cell {
width: get_visible_width(&block, flags.hyperlink == HyperlinkOption::Always),
contents: block,
alignment: Alignment::Left,
});
}