Skip to content

Commit

Permalink
fix(config): ensure MiB alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
madonuko committed Jan 8, 2025
1 parent 04429b3 commit 426d43f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,15 +461,15 @@ 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| {
// create partition with size
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
Expand Down

0 comments on commit 426d43f

Please sign in to comment.