/// Diagnose a given connection result and exit with exit code 0 if the
/// connection was successful or the server responded with UNAUTHORIZED,
/// otherwise exit with exit code 1.
Diagnose a given connection result and exit with exit code 0 if the
connection was successful or the server responded with UNAUTHORIZED,
otherwise exit with exit code 1.
Diagnose a given connection result and exit with exit code 0 if the connection was successful or the server responded with UNAUTHORIZED otherwise exit with exit code 1 .
fn diagnose_connection_result(
    connection_result: &Result<String, ArrowError>) -> ! {
    match connection_result {
        &Ok(_)        => process::exit(0),
        &Err(ref err) => match err.kind() {
            ErrorKind::Unauthorized => process::exit(0),
            _ => process::exit(1)
        }
    }
}
fn diagnose_connection_result ( connection_result : & Result < String , ArrowError > ) -> ! { match connection_result { & Ok ( _ ) => process :: exit ( 0 ) , & Err ( ref err ) => match err . kind ( ) { ErrorKind :: Unauthorized => process :: exit ( 0 ) , _ => process :: exit ( 1 ) } } }
Diagnose a given connection result and exit with exit code 0 if the
connection was successful or the server responded with UNAUTHORIZED,
otherwise exit with exit code 1.
Diagnose a given connection result and exit with exit code 0 if the connection was successful or the server responded with UNAUTHORIZED otherwise exit with exit code 1 .
connection_result
&Result<String, ArrowError>