pub fn check_ident(ident_type: &str, ident: &str) -> anyhow::Result<()> {
    ensure!(ident.len() > 0, "{} must be non-empty", ident_type);
    ensure!(
        !ident.chars().all(char::is_whitespace),
        "{} must be non-empty",
        ident_type
    );
    ensure!(
        ident.chars().all(|c| c != '/'),
        "{} must not contain a slash",
        ident_type
    );

    Ok(())
}
/// Ensures that the given ident fits the rules that we set for Aftman, with
/// nice error reporting.
Ensures that the given ident fits the rules that we set for Aftman, with
nice error reporting.
Ensures that the given ident fits the rules that we set for Aftman with nice error reporting .
pub fn check_ident(ident_type: &str, ident: &str) -> anyhow::Result<()> {
    ensure!(ident.len() > 0, "{} must be non-empty", ident_type);
    ensure!(
        !ident.chars().all(char::is_whitespace),
        "{} must be non-empty",
        ident_type
    );
    ensure!(
        ident.chars().all(|c| c != '/'),
        "{} must not contain a slash",
        ident_type
    );
    Ok(())
}
pub fn check_ident ( ident_type : & str , ident : & str ) -> anyhow :: Result < ( ) > { ensure ! ( ident len ( ) 0 " " ident_type ) ; ensure ! ( ident chars ( ) all ( char is_whitespace ) " " ident_type ) ; ensure ! ( ident chars ( ) all ( c c '/' ) " " ident_type ) ; Ok ( ( ) ) }
Ensures that the given ident fits the rules that we set for Aftman, with
nice error reporting.
Ensures that the given ident fits the rules that we set for Aftman with nice error reporting .
ident_type
&str
ident
&str
ident_type
&str
ident
&str