Skip to content

Commit

Permalink
Merge pull request #475 from cunarist/fix-option-snippets
Browse files Browse the repository at this point in the history
Update guide sentence and error code snippet
  • Loading branch information
temeddix authored Oct 29, 2024
2 parents 839a584 + 9fb9506 commit a92bf1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions documentation/docs/error-handling.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Error Handling

Effective error handling is crucial in applications to ensure a smooth user experience and predictable application behavior.
Effective error handling is crucial in applications to ensure predictable application behavior.

Rinf expects developers to use Flutter exclusively for the UI layer while keeping all business logic in Rust. This approach encourages handling errors and logging directly in Rust without crossing the language boundary.[^1]

Expand All @@ -22,9 +22,10 @@ fn not_good() {

fn good() -> Result<(), SomeError> {
let option = get_option();
let value_a = option?;
let value_a = option.ok_or(SomeError)?;
let result = get_result();
let value_b = result?;
Ok(())
}
```

Expand Down

0 comments on commit a92bf1a

Please sign in to comment.