mirror of
https://github.com/eza-community/eza.git
synced 2025-12-23 05:36:50 +00:00
chore: Apply reviewer (ariasuni) supplied patch
This commit is contained in:
parent
939b79dc6e
commit
6e6b87bbec
6 changed files with 25 additions and 25 deletions
18
Cargo.lock
generated
18
Cargo.lock
generated
|
|
@ -425,7 +425,6 @@ dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"natord-plus-plus",
|
"natord-plus-plus",
|
||||||
"nu-ansi-term",
|
"nu-ansi-term",
|
||||||
"number_prefix",
|
|
||||||
"palette",
|
"palette",
|
||||||
"path-clean",
|
"path-clean",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
|
|
@ -439,6 +438,7 @@ dependencies = [
|
||||||
"timeago",
|
"timeago",
|
||||||
"trycmd",
|
"trycmd",
|
||||||
"unicode-width 0.2.2",
|
"unicode-width 0.2.2",
|
||||||
|
"unit-prefix",
|
||||||
"uutils_term_grid",
|
"uutils_term_grid",
|
||||||
"uzers",
|
"uzers",
|
||||||
"windows-sys 0.60.2",
|
"windows-sys 0.60.2",
|
||||||
|
|
@ -534,9 +534,9 @@ checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "half"
|
name = "half"
|
||||||
version = "2.7.0"
|
version = "2.7.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e54c115d4f30f52c67202f079c5f9d8b49db4691f460fdb0b4c2e838261b2ba5"
|
checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"crunchy",
|
"crunchy",
|
||||||
|
|
@ -885,12 +885,6 @@ dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "number_prefix"
|
|
||||||
version = "0.4.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "object"
|
name = "object"
|
||||||
version = "0.37.3"
|
version = "0.37.3"
|
||||||
|
|
@ -1598,6 +1592,12 @@ version = "0.2.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
|
checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unit-prefix"
|
||||||
|
version = "0.5.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unsafe-libyaml-norway"
|
name = "unsafe-libyaml-norway"
|
||||||
version = "0.2.15"
|
version = "0.2.15"
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ locale = "0.2"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
natord-plus-plus = "2.0"
|
natord-plus-plus = "2.0"
|
||||||
path-clean = "1.0.1"
|
path-clean = "1.0.1"
|
||||||
number_prefix = "0.4"
|
unit-prefix = "0.5.2"
|
||||||
palette = { version = "0.7.6", default-features = false, features = ["std"] }
|
palette = { version = "0.7.6", default-features = false, features = ["std"] }
|
||||||
percent-encoding = "2.3.1"
|
percent-encoding = "2.3.1"
|
||||||
phf = { version = "0.12.1", features = ["macros"] }
|
phf = { version = "0.12.1", features = ["macros"] }
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ pub struct User(pub uid_t);
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
pub struct Group(pub gid_t);
|
pub struct Group(pub gid_t);
|
||||||
|
|
||||||
/// A file’s size, in bytes. This is usually formatted by the `number_prefix`
|
/// A file’s size, in bytes. This is usually formatted by the `unit_prefix`
|
||||||
/// crate into something human-readable.
|
/// crate into something human-readable.
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
pub enum Size {
|
pub enum Size {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
use locale::Numeric as NumericLocale;
|
use locale::Numeric as NumericLocale;
|
||||||
use nu_ansi_term::Style;
|
use nu_ansi_term::Style;
|
||||||
use number_prefix::Prefix;
|
use unit_prefix::Prefix;
|
||||||
|
|
||||||
use crate::fs::fields as f;
|
use crate::fs::fields as f;
|
||||||
use crate::output::cell::{DisplayWidth, TextCell};
|
use crate::output::cell::{DisplayWidth, TextCell};
|
||||||
|
|
@ -19,7 +19,7 @@ impl f::Blocksize {
|
||||||
size_format: SizeFormat,
|
size_format: SizeFormat,
|
||||||
numerics: &NumericLocale,
|
numerics: &NumericLocale,
|
||||||
) -> TextCell {
|
) -> TextCell {
|
||||||
use number_prefix::NumberPrefix;
|
use unit_prefix::NumberPrefix;
|
||||||
|
|
||||||
let size = match self {
|
let size = match self {
|
||||||
Self::Some(s) => s,
|
Self::Some(s) => s,
|
||||||
|
|
@ -87,7 +87,7 @@ pub mod test {
|
||||||
use crate::output::table::SizeFormat;
|
use crate::output::table::SizeFormat;
|
||||||
|
|
||||||
use locale::Numeric as NumericLocale;
|
use locale::Numeric as NumericLocale;
|
||||||
use number_prefix::Prefix;
|
use unit_prefix::Prefix;
|
||||||
|
|
||||||
struct TestColours;
|
struct TestColours;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
use locale::Numeric as NumericLocale;
|
use locale::Numeric as NumericLocale;
|
||||||
use nu_ansi_term::Style;
|
use nu_ansi_term::Style;
|
||||||
use number_prefix::Prefix;
|
use unit_prefix::Prefix;
|
||||||
|
|
||||||
use crate::fs::fields as f;
|
use crate::fs::fields as f;
|
||||||
use crate::output::cell::{DisplayWidth, TextCell};
|
use crate::output::cell::{DisplayWidth, TextCell};
|
||||||
|
|
@ -21,7 +21,7 @@ impl f::Size {
|
||||||
numerics: &NumericLocale,
|
numerics: &NumericLocale,
|
||||||
color_scale_info: Option<ColorScaleInformation>,
|
color_scale_info: Option<ColorScaleInformation>,
|
||||||
) -> TextCell {
|
) -> TextCell {
|
||||||
use number_prefix::NumberPrefix;
|
use unit_prefix::NumberPrefix;
|
||||||
|
|
||||||
let size = match self {
|
let size = match self {
|
||||||
Self::Some(s) => s,
|
Self::Some(s) => s,
|
||||||
|
|
@ -140,7 +140,7 @@ pub mod test {
|
||||||
use locale::Numeric as NumericLocale;
|
use locale::Numeric as NumericLocale;
|
||||||
use nu_ansi_term::Color::*;
|
use nu_ansi_term::Color::*;
|
||||||
use nu_ansi_term::Style;
|
use nu_ansi_term::Style;
|
||||||
use number_prefix::Prefix;
|
use unit_prefix::Prefix;
|
||||||
|
|
||||||
struct TestColours;
|
struct TestColours;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -315,8 +315,8 @@ impl FileStyle for FileTypes {
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
impl render::BlocksColours for Theme {
|
impl render::BlocksColours for Theme {
|
||||||
fn blocksize(&self, prefix: Option<number_prefix::Prefix>) -> Style {
|
fn blocksize(&self, prefix: Option<unit_prefix::Prefix>) -> Style {
|
||||||
use number_prefix::Prefix::{Gibi, Giga, Kibi, Kilo, Mebi, Mega};
|
use unit_prefix::Prefix::{Gibi, Giga, Kibi, Kilo, Mebi, Mega};
|
||||||
|
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
let style = match prefix {
|
let style = match prefix {
|
||||||
|
|
@ -329,8 +329,8 @@ impl render::BlocksColours for Theme {
|
||||||
style.unwrap_or_default()
|
style.unwrap_or_default()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn unit(&self, prefix: Option<number_prefix::Prefix>) -> Style {
|
fn unit(&self, prefix: Option<unit_prefix::Prefix>) -> Style {
|
||||||
use number_prefix::Prefix::{Gibi, Giga, Kibi, Kilo, Mebi, Mega};
|
use unit_prefix::Prefix::{Gibi, Giga, Kibi, Kilo, Mebi, Mega};
|
||||||
|
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
let style = match prefix {
|
let style = match prefix {
|
||||||
|
|
@ -416,8 +416,8 @@ impl render::PermissionsColours for Theme {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl render::SizeColours for Theme {
|
impl render::SizeColours for Theme {
|
||||||
fn size(&self, prefix: Option<number_prefix::Prefix>) -> Style {
|
fn size(&self, prefix: Option<unit_prefix::Prefix>) -> Style {
|
||||||
use number_prefix::Prefix::{Gibi, Giga, Kibi, Kilo, Mebi, Mega};
|
use unit_prefix::Prefix::{Gibi, Giga, Kibi, Kilo, Mebi, Mega};
|
||||||
|
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
return match prefix {
|
return match prefix {
|
||||||
|
|
@ -429,8 +429,8 @@ impl render::SizeColours for Theme {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn unit(&self, prefix: Option<number_prefix::Prefix>) -> Style {
|
fn unit(&self, prefix: Option<unit_prefix::Prefix>) -> Style {
|
||||||
use number_prefix::Prefix::{Gibi, Giga, Kibi, Kilo, Mebi, Mega};
|
use unit_prefix::Prefix::{Gibi, Giga, Kibi, Kilo, Mebi, Mega};
|
||||||
|
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
return match prefix {
|
return match prefix {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue