|
|
|
|
|
by estebank
409 days ago
|
|
For things like this I find that ? still works well enough, but I tend to write code like match x(y) {
Ok(None) => "not found".into(),
Ok(Some(x)) => x,
Err(e) => handle_error(e),
}
Because of pattern matching, I often also have one arm for specific errors to handle them specifically in the same way as the ok branches above. |
|