diff --git a/src/uucore_procs/src/lib.rs b/src/uucore_procs/src/lib.rs index d46fd6e10..11d89c97e 100644 --- a/src/uucore_procs/src/lib.rs +++ b/src/uucore_procs/src/lib.rs @@ -67,9 +67,10 @@ pub fn help_about(input: TokenStream) -> TokenStream { let input: Vec = input.into_iter().collect(); let filename = get_argument(&input, 0, "filename"); let text: String = uuhelp_parser::parse_about(&read_help(&filename)); - if text.is_empty() { - panic!("About text not found! Make sure the markdown format is correct"); - } + assert!( + !text.is_empty(), + "About text not found! Make sure the markdown format is correct" + ); TokenTree::Literal(Literal::string(&text)).into() } @@ -84,9 +85,10 @@ pub fn help_usage(input: TokenStream) -> TokenStream { let input: Vec = input.into_iter().collect(); let filename = get_argument(&input, 0, "filename"); let text: String = uuhelp_parser::parse_usage(&read_help(&filename)); - if text.is_empty() { - panic!("Usage text not found! Make sure the markdown format is correct"); - } + assert!( + !text.is_empty(), + "Usage text not found! Make sure the markdown format is correct" + ); TokenTree::Literal(Literal::string(&text)).into() }