1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-21 01:39:36 +01:00

refactor(libutil): remove showBytes() in favor of renderSize()

The `showBytes()` function was redundant with `renderSize()` as the
latter automatically selects the appropriate unit (KiB, MiB, GiB, etc.)
based on the value, whereas `showBytes()` always formatted as MiB
regardless of size.

Co-authored-by: Bernardo Meurer Costa <beme@anthropic.com>
This commit is contained in:
Marcel 2025-10-27 00:55:40 +01:00
parent 9d4d10954a
commit f234633e27
No known key found for this signature in database
GPG key ID: 446F3B093DF81C6A
5 changed files with 2 additions and 11 deletions

View file

@ -312,7 +312,7 @@ void LocalStore::optimiseStore()
optimiseStore(stats);
printInfo("%s freed by hard-linking %d files", showBytes(stats.bytesFreed), stats.filesLinked);
printInfo("%s freed by hard-linking %d files", renderSize(stats.bytesFreed), stats.filesLinked);
}
void LocalStore::optimisePath(const Path & path, RepairFlag repair)