diff options
author | Narawit Rakket <narawitrakket@hotmail.com> | 2022-08-07 15:31:20 +0700 |
---|---|---|
committer | Abin Simon <abinsimon10@gmail.com> | 2022-08-07 19:53:08 +0530 |
commit | 685d5a6c2f6ce45e9bc16246a25f5971559f9a99 (patch) | |
tree | a009b3a7673ab254dfe7e0af1f2be2234a616b33 | |
parent | c239291ca8088d0ec2e9c1442333fb721ee3f83d (diff) |
refactor: do not mention `clap` in panic message
Mention `clap` in the comment instead because this information is
useful for developers but can confuse users
-rw-r--r-- | src/flags/blocks.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/flags/blocks.rs b/src/flags/blocks.rs index 4e06747..11e1893 100644 --- a/src/flags/blocks.rs +++ b/src/flags/blocks.rs @@ -121,9 +121,8 @@ impl Configurable<Self> for Blocks { let mut blocks: Vec<Block> = Vec::with_capacity(values.len()); for value in values { blocks.push(Block::try_from(value).unwrap_or_else(|_| { - unreachable!( - "Invalid value '{value}' for 'blocks' flag should be handled by `clap`" - ) + // Invalid value should be handled by `clap` when building an `ArgMatches` + unreachable!("Invalid value '{value}' for 'blocks'") })); } Some(Self(blocks)) |