(n: i32)
| 4 | */ |
| 5 | fn main() -> Result<(), String> { |
| 6 | fn incremented(n: i32) -> Result<i32, String> { |
| 7 | if n < 0 { Err(format!("negative argument")) } |
| 8 | else { Ok(n + 1) } |
| 9 | } |
| 10 | println!("{} ", incremented(4)?); |
| 11 | println!("{} ", incremented(-3)?); |
| 12 | println!("{} ", incremented(7)?); |
nothing calls this directly
no outgoing calls
no test coverage detected