proxmox-backup/pbs-api-types
Thomas Lamprecht ab1c07a622 human byte: add from string parser
Adapted from Dietmar's v3 on pbs-devel but some changes:
- reworked with a strip_suffix fn that does matching, way shorter and
  even easier to read IMO
- make b/B byte symbol fully optional, not just for base-10
- also trim trailing whitespace for SizeUnit::Byte
- simplify the FromStr impl
- adapt parser unit tests such that we actually see the failed test's
  definition line, simplifies debugging a bit

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-20 19:35:24 +01:00
..
src human byte: add from string parser 2021-11-20 19:35:24 +01:00
Cargo.toml use proxmox::tools::fd::fd_change_cloexec from proxmox 0.15.3 2021-11-18 13:43:41 +01:00