]> git.proxmox.com Git - pmg-log-tracker.git/commit
use pico-args instead of clap
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 25 Oct 2023 11:20:26 +0000 (13:20 +0200)
committerStoiko Ivanov <s.ivanov@proxmox.com>
Tue, 13 Feb 2024 14:54:42 +0000 (15:54 +0100)
commite34f84b91f1c6341a0015b7bd9a905f9790d1880
tree3ba339e7bdb18c7a31b9e965cd3e44e8b4d60114
parenta1ebc0c6feecbc54b22f78e141958c015cfd9a84
use pico-args instead of clap

Instead of upgrading from clap3 to clap4 (which seems to change their
interface every year or so), switch to the much smaller pico-args. (Same
as we did for termproxy recently, see [0])

It has almost all features we need (except producing help output) and
supports OsString, but wihout any dependencies. This decreases compile
time and reduces the size of the resulting binary. It also reduces the
lines of code.

The only difference is now the different output for errors, e.g. for
missing values of options.

Help output is copied from the old clap output.

0: https://git.proxmox.com/?p=pve-xtermjs.git;a=commitdiff;h=24d707d0506b120a085b06b5f2b6000696879a1e

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Mira Limbeck <m.limbeck@proxmox.com>
Reviewed-by: Mira Limbeck <m.limbeck@proxmox.com>
Cargo.toml
src/main.rs