Skip to content

Commit 8cca41e

Browse files
committed
refactor(man): remove cli-man feature, gate on cli instead
The man page module only needs clap (provided by the cli feature), so there is no need for a separate cli-man feature. This matches how pdu-usage-md requires only cli. https://claude.ai/code/session_01CrXuWDMVQsiUBoy6ceACsF
1 parent ed7181b commit 8cca41e

5 files changed

Lines changed: 4 additions & 6 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ required-features = ["cli-completions"]
4747
[[bin]]
4848
name = "pdu-man-page"
4949
path = "cli/man_page.rs"
50-
required-features = ["cli-man"]
50+
required-features = ["cli"]
5151

5252
[[bin]]
5353
name = "pdu-usage-md"
@@ -64,7 +64,6 @@ default = ["cli"]
6464
json = ["serde/derive", "serde_json"]
6565
cli = ["clap/derive", "clap_complete", "clap-utilities", "json"]
6666
cli-completions = ["cli"]
67-
cli-man = ["cli"]
6867
ai-instructions = ["clap/derive"]
6968

7069
[dependencies]

run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#! /bin/bash
22
set -o errexit -o pipefail -o nounset
3-
exec cargo run --bin="$1" --features cli-completions,cli-man,ai-instructions -- "${@:2}"
3+
exec cargo run --bin="$1" --features cli-completions,ai-instructions -- "${@:2}"

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub use serde_json;
1414
pub mod app;
1515
#[cfg(feature = "cli")]
1616
pub mod args;
17-
#[cfg(feature = "cli-man")]
17+
#[cfg(feature = "cli")]
1818
pub mod man_page;
1919
#[cfg(feature = "cli")]
2020
pub mod runtime_error;

test.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ unit --no-default-features "$@"
7777
unit --all-features "$@"
7878
unit --features cli "$@"
7979
unit --features cli-completions "$@"
80-
unit --features cli-man "$@"
8180
unit --features ai-instructions "$@"
8281

8382
if [[ -f "$failure_marker" ]]; then

tests/sync_man_page.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Since the CLI in Windows looks a little different, and I am way too lazy to make two versions
66
// of man page files, the following test would only run in UNIX-like environment.
77
#![cfg(unix)]
8-
#![cfg(feature = "cli-man")]
8+
#![cfg(feature = "cli")]
99

1010
use parallel_disk_usage::man_page::render_man_page;
1111

0 commit comments

Comments
 (0)