/// Return the error message if the condition is false.
Return the error message if the condition is false.
Return the error message if the condition is false .
pub fn result_assert(cond: bool, message: &str) -> Result<(), String> {
    if cond {
        Ok(())
    } else {
        Err(message.to_string())
    }
}
pub fn result_assert ( cond : bool , message : & str ) -> Result < ( ) , String > { if cond { Ok ( ( ) ) } else { Err ( message . to_string ( ) ) } }
Return the error message if the condition is false.
Return the error message if the condition is false .
cond
bool
message
&str