mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Fix clippy::manual_assert.
This commit is contained in:
parent
98460132fd
commit
5d986bfb4c
1 changed files with 8 additions and 6 deletions
|
@ -67,9 +67,10 @@ pub fn help_about(input: TokenStream) -> TokenStream {
|
||||||
let input: Vec<TokenTree> = input.into_iter().collect();
|
let input: Vec<TokenTree> = input.into_iter().collect();
|
||||||
let filename = get_argument(&input, 0, "filename");
|
let filename = get_argument(&input, 0, "filename");
|
||||||
let text: String = uuhelp_parser::parse_about(&read_help(&filename));
|
let text: String = uuhelp_parser::parse_about(&read_help(&filename));
|
||||||
if text.is_empty() {
|
assert!(
|
||||||
panic!("About text not found! Make sure the markdown format is correct");
|
!text.is_empty(),
|
||||||
}
|
"About text not found! Make sure the markdown format is correct"
|
||||||
|
);
|
||||||
TokenTree::Literal(Literal::string(&text)).into()
|
TokenTree::Literal(Literal::string(&text)).into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,9 +85,10 @@ pub fn help_usage(input: TokenStream) -> TokenStream {
|
||||||
let input: Vec<TokenTree> = input.into_iter().collect();
|
let input: Vec<TokenTree> = input.into_iter().collect();
|
||||||
let filename = get_argument(&input, 0, "filename");
|
let filename = get_argument(&input, 0, "filename");
|
||||||
let text: String = uuhelp_parser::parse_usage(&read_help(&filename));
|
let text: String = uuhelp_parser::parse_usage(&read_help(&filename));
|
||||||
if text.is_empty() {
|
assert!(
|
||||||
panic!("Usage text not found! Make sure the markdown format is correct");
|
!text.is_empty(),
|
||||||
}
|
"Usage text not found! Make sure the markdown format is correct"
|
||||||
|
);
|
||||||
TokenTree::Literal(Literal::string(&text)).into()
|
TokenTree::Literal(Literal::string(&text)).into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue