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

1073
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -23,24 +23,24 @@ version_check = "0.9.*"
[dependencies]
crossterm = { version = "0.27.0", features = ["serde"] }
dirs = "4"
dirs = "5"
libc = "0.2.*"
human-sort = "0.2.2"
term_grid = "0.1.*"
terminal_size = "0.1.*"
term_grid = "0.2"
terminal_size = "0.3"
thiserror = "1.0"
sys-locale = "0.3"
once_cell = "1.17.1"
chrono = { version = "0.4.*", features = ["unstable-locales"] }
chrono-humanize = "0.2"
unicode-width = "0.1.*"
lscolors = "0.15.0"
lscolors = "0.16.0"
wild = "2.0"
globset = "0.4.*"
xdg = "2.1"
yaml-rust = "0.4.*"
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.8"
serde_yaml = "0.9"
url = "2.1"
vsort = "0.2"

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,
});
}

View file

@ -28,7 +28,6 @@ pub use display::Display;
pub use header::Header;
pub use hyperlink::HyperlinkOption;
pub use icons::IconOption;
pub use icons::IconSeparator;
pub use icons::IconTheme;
pub use icons::Icons;
pub use ignore_globs::IgnoreGlobs;

View file

@ -27,7 +27,6 @@ pub use self::owner::Owner;
pub use self::permissions::Permissions;
pub use self::size::Size;
pub use self::symlink::SymLink;
pub use crate::icon::Icons;
use crate::flags::{Display, Flags, Layout, PermissionFlag};
use crate::{print_error, ExitCode};