fn valid_threads(string: String) -> Result<(), String> {
    match string.parse::<u32>() {
        Ok(num) if num >= 2 => { Ok(()) }
        _ => { Err("Please provide a valid amount of threads (>=2)".to_string()) }
    }
}
/// Validate the correctness of the user provided amount of threads
Validate the correctness of the user provided amount of threads
Validate the correctness of the user provided amount of threads
fn valid_threads(string: String) -> Result<(), String> {
    match string.parse::<u32>() {
        Ok(num) if num >= 2 => { Ok(()) }
        _ => { Err("Please provide a valid amount of threads (>=2)".to_string()) }
    }
}
fn valid_threads ( string : String ) -> Result < ( ) , String > { match string . parse :: < u32 > ( ) { Ok ( num ) if num >= 2 => { Ok ( ( ) ) } _ => { Err ( " " . to_string ( ) ) } } }
Validate the correctness of the user provided amount of threads
Validate the correctness of the user provided amount of threads
string
String
string
String