mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-26 20:16:31 +00:00
Improve error messages
This commit is contained in:
1 parent
c0f94ad6aa
commit
31c0bcfeae
1 file changed
+2
-2
+2
-2
@@ -352,7 +352,7 @@ fn run() -> Result<(), AnyhowError> {
|
|||||||
.get_one::<String>("group_bytes")
|
.get_one::<String>("group_bytes")
|
||||||
.map(|s| {
|
.map(|s| {
|
||||||
s.parse::<NonZeroU8>().map(u8::from).context(anyhow!(
|
s.parse::<NonZeroU8>().map(u8::from).context(anyhow!(
|
||||||
"failed to parse `--group-bytes` arg {:?} as unsigned nonzero integer",
|
"failed to parse `--group-bytes`/`-g` arg {:?} as unsigned nonzero integer",
|
||||||
s
|
s
|
||||||
))
|
))
|
||||||
})
|
})
|
||||||
@@ -362,7 +362,7 @@ fn run() -> Result<(), AnyhowError> {
|
|||||||
group_bytes
|
group_bytes
|
||||||
} else {
|
} else {
|
||||||
return Err(anyhow!(
|
return Err(anyhow!(
|
||||||
"the possible options of group_bytes could only be 1, 2, 4 or 8. "
|
"Possible options for the `--group-bytes`/`-g` option are 1, 2, 4 or 8. "
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in new issue
Block a user