fn parse_status(status_str: &str) -> (Status, bool) {
    let mut status = Status::Reviewing;
    let mut is_trying = false;
    for word in status_str.splitn(2, ' ') {
        match word {
            "success" => status = Status::Success,
            "pending" => status = Status::Pending,
            "approved" => status = Status::Approved,
            "error" => status = Status::Error,
            "failure" => status = Status::Failure,
            "(try)" => is_trying = true,
            _ => {}
        }
    }
    (status, is_trying)
}
/// Parses the rendered approval status string into the status/is-try pair.
Parses the rendered approval status string into the status/is-try pair.
Parses the rendered approval status string into the status / is - try pair .
fn parse_status(status_str: &str) -> (Status, bool) {
    let mut status = Status::Reviewing;
    let mut is_trying = false;
    for word in status_str.splitn(2, ' ') {
        match word {
            "success" => status = Status::Success,
            "pending" => status = Status::Pending,
            "approved" => status = Status::Approved,
            "error" => status = Status::Error,
            "failure" => status = Status::Failure,
            "(try)" => is_trying = true,
            _ => {}
        }
    }
    (status, is_trying)
}
fn parse_status ( status_str : & str ) -> ( Status , bool ) { let mut status = Status :: Reviewing ; let mut is_trying = false ; for word in status_str . splitn ( 2 , ' ' ) { match word { " " => status = Status :: Success , " " => status = Status :: Pending , " " => status = Status :: Approved , " " => status = Status :: Error , " " => status = Status :: Failure , " " => is_trying = true , _ => { } } } ( status , is_trying ) }
Parses the rendered approval status string into the status/is-try pair.
Parses the rendered approval status string into the status / is - try pair .
status_str
&str
status_str
&str