OXYGENHUB

Clippy: compare with is_empty in the help test 99e3e0af08df

Author
Andy McCall @andymccall <[email protected]>
When
· 2026-09-28 08:52 UTC
Signature
✔ signed by Andy McCall
Hash
99e3e0af08df756ceeb08da32e0c1d5aed950cb1606339cdc94a8295a4691cf9
Depends on
d42369abf180 fce44ae9ad29
Depended on by
nothing yet
In bookmarks
agents-in-readme bare-hashes carried-not-removed carry-identical doctor-trust identical-sides keyless-tags main merge-remote-bookmark only-help-103 paths-for-resolutions-and-amend push-notes show-stat subrepo-pin-state switch-says
In tags
v0.1.0 v0.10.0 v0.11.0 v0.2.0 v0.3.0 v0.3.1 v0.4.0 v0.4.1 v0.4.2 v0.4.3 v0.4.4 v0.4.5 v0.4.6 v0.5.0 v0.5.1 v0.6.0 v0.7.0 v0.8.0 v0.9.0
Edits
3 atoms, 0 tree operations, 1 file

Browse the tree at this change

modified src/cli/mod.rs +2 −2
…
1033 unchanged lines
1034 1034
    fn every_command_and_argument_has_help() {
1035 1035
        fn walk(cmd: &clap::Command, path: &str, missing: &mut Vec<String>) {
1036 1036
            let here = format!("{path} {}", cmd.get_name()).trim().to_string();
1037 -
            if cmd.get_about().is_none() && path != "" {
1037 +
            if cmd.get_about().is_none() && !path.is_empty() {
1038 1038
                missing.push(format!("{here} (command)"));
1039 1039
            }
1040 1040
            for a in cmd.get_arguments() {
1041 1041
                let id = a.get_id().as_str();
1042 -
                if id == "help" || id == "version" || a.is_global_set() && path != "" {
1042 +
                if id == "help" || id == "version" || (a.is_global_set() && !path.is_empty()) {
1043 1043
                    continue;
1044 1044
                }
1045 1045
                if a.get_help().is_none() && a.get_long_help().is_none() {
…
17 unchanged lines