From 426d43fb76c7b5b2bb474209bb1d2db044e12e1f Mon Sep 17 00:00:00 2001 From: madonuko Date: Thu, 9 Jan 2025 02:21:01 +0800 Subject: [PATCH] fix(config): ensure MiB alignment --- src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 8b65dbe..e0bc97b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -461,7 +461,7 @@ impl PartitionLayout { "0".to_string() } else { // create partition after last partition - ByteSize::b(last_end).to_string_as(true).replace(' ', "") + format!("{}MiB", last_end / 1024 / 1024) }; let end_string = part.size.map_or("100%".to_string(), |size| { @@ -469,7 +469,7 @@ impl PartitionLayout { last_end += size.as_u64(); // remove space for partition table - ByteSize::b(last_end).to_string_as(true).replace(' ', "") + format!("{}MiB", last_end / 1024 / 1024) }); // not going to change this for now though, but will revisit