5 Commits

Author SHA1 Message Date
andy.boot
968377eebd deps: cargo update 2025-10-06 20:42:19 +01:00
wugeer
99bf0fc041 docs: update sample config.toml 2024-08-21 18:47:15 +01:00
Efertone
e17a1af476 remove depth from config.toml and fix style issues
Signed-off-by: Efertone <efertone@pm.me>
2023-03-06 21:43:15 +00:00
Efertone
2f7c197cd7 feat: default option for depth from config file
- If `--depth` flag is not defined (or it has an invalid value), a value
  from the config file will be used.
- If no `depth` entry in the config file (or there is no config file),
  the default `usize::MAX` will be used.

Added test cases:
- no config and no flag defined              -> `usize::MAX` should be used
- config defined, but flag is not defined    -> config value should be used
- config is not defined, but flag is defined -> flag value should be used
- both config and flag is defined            -> flag value should be used

Additional changes:

- Fixed some clippy issues.
- Added comments to the example `config.toml` file.
  (copy from flag description)

Closes: #314

Signed-off-by: Balazs Nadasdi <efertone@pm.me>
2023-03-06 21:43:15 +00:00
andy.boot
5980858b39 Feature: Config file
Read flags for several params from config file.

This was a popular requested feature (many people want to run with -r on
by default).
2022-08-22 12:05:04 +01:00