mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2026-01-15 01:31:08 +00:00
Change the interface provided by the `parse_size()` function to reduce its responsibilities to just a single task: parsing a number of bytes from a string of the form '123KB', etc. Previously, the function was also responsible for deciding which mode truncate would operate in. Furthermore, this commit simplifies the code for parsing the number and unit to be less verbose and use less mutable state. Finally, this commit adds some unit tests for the `parse_size()` function. |
||
|---|---|---|
| .. | ||
| by-util | ||
| common | ||
| fixtures | ||
| tests.rs | ||