Skip to content

Commit 9dafa30

Browse files
committed
♻️ Route xattr --name parsing through XattrName's FromStr
1 parent 2ed0a5d commit 9dafa30

3 files changed

Lines changed: 2 additions & 16 deletions

File tree

cli/src/command/xattr.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::{
1010
collect_split_archives,
1111
},
1212
},
13-
utils::{GlobPatterns, PathPartExt, cli_parsers::parse_xattr_name, env::NamedTempFile},
13+
utils::{GlobPatterns, PathPartExt, env::NamedTempFile},
1414
};
1515
use base64::Engine;
1616
use bstr::{ByteSlice, io::BufReadExt};
@@ -89,12 +89,7 @@ impl Command for GetXattrCommand {
8989
pub(crate) struct SetXattrCommand {
9090
#[command(flatten)]
9191
file: FileArgsCompat,
92-
#[arg(
93-
short,
94-
long,
95-
value_parser = parse_xattr_name,
96-
help = "Name of extended attribute"
97-
)]
92+
#[arg(short, long, help = "Name of extended attribute")]
9893
name: Option<pna::XattrName>,
9994
#[arg(short, long, help = "Value of extended attribute")]
10095
value: Option<Value>,

cli/src/utils.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#[cfg(feature = "acl")]
22
pub(crate) mod acl;
3-
pub(crate) mod cli_parsers;
43
pub(crate) mod env;
54
pub(crate) mod fmt;
65
pub(crate) mod fs;

cli/src/utils/cli_parsers.rs

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)