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",
|
||||
"natord-plus-plus",
|
||||
"nu-ansi-term",
|
||||
"number_prefix",
|
||||
"palette",
|
||||
"path-clean",
|
||||
"percent-encoding",
|
||||
|
|
@ -439,6 +438,7 @@ dependencies = [
|
|||
"timeago",
|
||||
"trycmd",
|
||||
"unicode-width 0.2.2",
|
||||
"unit-prefix",
|
||||
"uutils_term_grid",
|
||||
"uzers",
|
||||
"windows-sys 0.60.2",
|
||||
|
|
@ -534,9 +534,9 @@ checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
|
|||
|
||||
[[package]]
|
||||
name = "half"
|
||||
version = "2.7.0"
|
||||
version = "2.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e54c115d4f30f52c67202f079c5f9d8b49db4691f460fdb0b4c2e838261b2ba5"
|
||||
checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"crunchy",
|
||||
|
|
@ -885,12 +885,6 @@ dependencies = [
|
|||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "number_prefix"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
|
||||
|
||||
[[package]]
|
||||
name = "object"
|
||||
version = "0.37.3"
|
||||
|
|
@ -1598,6 +1592,12 @@ version = "0.2.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"
|
||||
|
||||
[[package]]
|
||||
name = "unit-prefix"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3"
|
||||
|
||||
[[package]]
|
||||
name = "unsafe-libyaml-norway"
|
||||
version = "0.2.15"
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ locale = "0.2"
|
|||
log = "0.4"
|
||||
natord-plus-plus = "2.0"
|
||||
path-clean = "1.0.1"
|
||||
number_prefix = "0.4"
|
||||
unit-prefix = "0.5.2"
|
||||
palette = { version = "0.7.6", default-features = false, features = ["std"] }
|
||||
percent-encoding = "2.3.1"
|
||||
phf = { version = "0.12.1", features = ["macros"] }
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ pub struct User(pub uid_t);
|
|||
#[derive(Copy, Clone)]
|
||||
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.
|
||||
#[derive(Copy, Clone)]
|
||||
pub enum Size {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
use locale::Numeric as NumericLocale;
|
||||
use nu_ansi_term::Style;
|
||||
use number_prefix::Prefix;
|
||||
use unit_prefix::Prefix;
|
||||
|
||||
use crate::fs::fields as f;
|
||||
use crate::output::cell::{DisplayWidth, TextCell};
|
||||
|
|
@ -19,7 +19,7 @@ impl f::Blocksize {
|
|||
size_format: SizeFormat,
|
||||
numerics: &NumericLocale,
|
||||
) -> TextCell {
|
||||
use number_prefix::NumberPrefix;
|
||||
use unit_prefix::NumberPrefix;
|
||||
|
||||
let size = match self {
|
||||
Self::Some(s) => s,
|
||||
|
|
@ -87,7 +87,7 @@ pub mod test {
|
|||
use crate::output::table::SizeFormat;
|
||||
|
||||
use locale::Numeric as NumericLocale;
|
||||
use number_prefix::Prefix;
|
||||
use unit_prefix::Prefix;
|
||||
|
||||
struct TestColours;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
use locale::Numeric as NumericLocale;
|
||||
use nu_ansi_term::Style;
|
||||
use number_prefix::Prefix;
|
||||
use unit_prefix::Prefix;
|
||||
|
||||
use crate::fs::fields as f;
|
||||
use crate::output::cell::{DisplayWidth, TextCell};
|
||||
|
|
@ -21,7 +21,7 @@ impl f::Size {
|
|||
numerics: &NumericLocale,
|
||||
color_scale_info: Option<ColorScaleInformation>,
|
||||
) -> TextCell {
|
||||
use number_prefix::NumberPrefix;
|
||||
use unit_prefix::NumberPrefix;
|
||||
|
||||
let size = match self {
|
||||
Self::Some(s) => s,
|
||||
|
|
@ -140,7 +140,7 @@ pub mod test {
|
|||
use locale::Numeric as NumericLocale;
|
||||
use nu_ansi_term::Color::*;
|
||||
use nu_ansi_term::Style;
|
||||
use number_prefix::Prefix;
|
||||
use unit_prefix::Prefix;
|
||||
|
||||
struct TestColours;
|
||||
|
||||
|
|
|
|||
|
|
@ -315,8 +315,8 @@ impl FileStyle for FileTypes {
|
|||
|
||||
#[cfg(unix)]
|
||||
impl render::BlocksColours for Theme {
|
||||
fn blocksize(&self, prefix: Option<number_prefix::Prefix>) -> Style {
|
||||
use number_prefix::Prefix::{Gibi, Giga, Kibi, Kilo, Mebi, Mega};
|
||||
fn blocksize(&self, prefix: Option<unit_prefix::Prefix>) -> Style {
|
||||
use unit_prefix::Prefix::{Gibi, Giga, Kibi, Kilo, Mebi, Mega};
|
||||
|
||||
#[rustfmt::skip]
|
||||
let style = match prefix {
|
||||
|
|
@ -329,8 +329,8 @@ impl render::BlocksColours for Theme {
|
|||
style.unwrap_or_default()
|
||||
}
|
||||
|
||||
fn unit(&self, prefix: Option<number_prefix::Prefix>) -> Style {
|
||||
use number_prefix::Prefix::{Gibi, Giga, Kibi, Kilo, Mebi, Mega};
|
||||
fn unit(&self, prefix: Option<unit_prefix::Prefix>) -> Style {
|
||||
use unit_prefix::Prefix::{Gibi, Giga, Kibi, Kilo, Mebi, Mega};
|
||||
|
||||
#[rustfmt::skip]
|
||||
let style = match prefix {
|
||||
|
|
@ -416,8 +416,8 @@ impl render::PermissionsColours for Theme {
|
|||
}
|
||||
|
||||
impl render::SizeColours for Theme {
|
||||
fn size(&self, prefix: Option<number_prefix::Prefix>) -> Style {
|
||||
use number_prefix::Prefix::{Gibi, Giga, Kibi, Kilo, Mebi, Mega};
|
||||
fn size(&self, prefix: Option<unit_prefix::Prefix>) -> Style {
|
||||
use unit_prefix::Prefix::{Gibi, Giga, Kibi, Kilo, Mebi, Mega};
|
||||
|
||||
#[rustfmt::skip]
|
||||
return match prefix {
|
||||
|
|
@ -429,8 +429,8 @@ impl render::SizeColours for Theme {
|
|||
};
|
||||
}
|
||||
|
||||
fn unit(&self, prefix: Option<number_prefix::Prefix>) -> Style {
|
||||
use number_prefix::Prefix::{Gibi, Giga, Kibi, Kilo, Mebi, Mega};
|
||||
fn unit(&self, prefix: Option<unit_prefix::Prefix>) -> Style {
|
||||
use unit_prefix::Prefix::{Gibi, Giga, Kibi, Kilo, Mebi, Mega};
|
||||
|
||||
#[rustfmt::skip]
|
||||
return match prefix {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue