Preserve --help output ordering after upgrade Clap to 4.0

From the [4.0 breaking change][1]:

  ...
  * (help) Make DeriveDisplayOrder the default and removed the setting. To sort help, set next_display_order(None) (#2808)
  ...

[1]: https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#breaking-changes
This commit is contained in:
Lawrence Chou 2022-10-14 16:43:01 +08:00
parent da25328c2b
commit 5dafdd9a23
No known key found for this signature in database
GPG Key ID: 56B65EC9D482438D

View File

@ -63,7 +63,7 @@ const DEFAULT_DUMPS_DIR: &str = "dumps/";
const DEFAULT_LOG_LEVEL: &str = "INFO";
#[derive(Debug, Clone, Parser, Serialize, Deserialize)]
#[clap(version)]
#[clap(version, next_display_order = None)]
#[serde(rename_all = "snake_case", deny_unknown_fields)]
pub struct Opt {
/// Designates the location where database files will be created and retrieved.