Skip to content

Commit ca352bc

Browse files
committed
refactor(tree): Leverage clap for value splitting
1 parent ab6e94f commit ca352bc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/bin/cargo/commands/tree.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ pub fn cli() -> Command {
2929
(features, normal, build, dev, all, \
3030
no-normal, no-build, no-dev, no-proc-macro)",
3131
)
32-
.short('e'),
32+
.short('e')
33+
.value_delimiter(','),
3334
)
3435
.arg(
3536
optional_multi_opt(
@@ -271,7 +272,7 @@ fn parse_edge_kinds(
271272
let mut kinds = args.get_many::<String>("edges").map_or_else(
272273
|| Vec::new(),
273274
|es| {
274-
es.flat_map(|e| e.split(','))
275+
es.map(|e| e.as_str())
275276
.filter(|e| {
276277
if *e == "no-proc-macro" {
277278
no_proc_macro = true;

0 commit comments

Comments
 (0)