mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-29 23:23:53 +00:00
Fix usages of number_prefix
This commit is contained in:
parent
781d79e665
commit
2d0768c8d2
@ -9,8 +9,7 @@ use output::table::SizeFormat;
|
|||||||
|
|
||||||
impl f::Size {
|
impl f::Size {
|
||||||
pub fn render<C: Colours>(&self, colours: &C, size_format: SizeFormat, numerics: &NumericLocale) -> TextCell {
|
pub fn render<C: Colours>(&self, colours: &C, size_format: SizeFormat, numerics: &NumericLocale) -> TextCell {
|
||||||
use number_prefix::{binary_prefix, decimal_prefix};
|
use number_prefix::{Prefixed, Standalone, NumberPrefix, PrefixNames};
|
||||||
use number_prefix::{Prefixed, Standalone, PrefixNames};
|
|
||||||
|
|
||||||
let size = match *self {
|
let size = match *self {
|
||||||
f::Size::Some(s) => s,
|
f::Size::Some(s) => s,
|
||||||
@ -19,8 +18,8 @@ impl f::Size {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let result = match size_format {
|
let result = match size_format {
|
||||||
SizeFormat::DecimalBytes => decimal_prefix(size as f64),
|
SizeFormat::DecimalBytes => NumberPrefix::decimal(size as f64),
|
||||||
SizeFormat::BinaryBytes => binary_prefix(size as f64),
|
SizeFormat::BinaryBytes => NumberPrefix::binary(size as f64),
|
||||||
SizeFormat::JustBytes => {
|
SizeFormat::JustBytes => {
|
||||||
let string = numerics.format_int(size);
|
let string = numerics.format_int(size);
|
||||||
return TextCell::paint(colours.size(size), string);
|
return TextCell::paint(colours.size(size), string);
|
||||||
|
Loading…
Reference in New Issue
Block a user