Rust Typing Practice
Type the code below as fast and accurately as you can
Difficulty:
0
WPM
100%
Accuracy
0
Errors
60s
Timer
RustMedium
fn divide(a: f64, b: f64) -> Result<f64, String> {
if b == 0.0 {
Err("Division by zero".to_string())
} else {
Ok(a / b)
}
}
Start typing to begin