mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-26 20:16:31 +00:00
Make code compatible with rust 1.46
This commit is contained in:
1 parent
7a225fe732
commit
d1ae68585f
1 file changed
+8
-8
+8
-8
@@ -356,14 +356,14 @@ impl Unit {
|
|||||||
const fn get_multiplier(self) -> i64 {
|
const fn get_multiplier(self) -> i64 {
|
||||||
match self {
|
match self {
|
||||||
Self::Byte => 1,
|
Self::Byte => 1,
|
||||||
Self::Kilobyte => 1000i64.pow(1),
|
Self::Kilobyte => 1000,
|
||||||
Self::Megabyte => 1000i64.pow(2),
|
Self::Megabyte => 1000_000,
|
||||||
Self::Gigabyte => 1000i64.pow(3),
|
Self::Gigabyte => 1000_000_000,
|
||||||
Self::Terabyte => 1000i64.pow(4),
|
Self::Terabyte => 1000_000_000_000,
|
||||||
Self::Kibibyte => 1024i64.pow(1),
|
Self::Kibibyte => 1 << 10,
|
||||||
Self::Mebibyte => 1024i64.pow(2),
|
Self::Mebibyte => 1 << 20,
|
||||||
Self::Gibibyte => 1024i64.pow(3),
|
Self::Gibibyte => 1 << 30,
|
||||||
Self::Tebibyte => 1024i64.pow(4),
|
Self::Tebibyte => 1 << 40,
|
||||||
Self::Block {
|
Self::Block {
|
||||||
custom_size: Some(size),
|
custom_size: Some(size),
|
||||||
} => size.get(),
|
} => size.get(),
|
||||||
|
|||||||
Reference in new issue
Block a user