Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: András B Nagy <[email protected]>
  • Loading branch information
0xNeshi and BNAndras authored Dec 2, 2024
1 parent c989c25 commit bc95bd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion concepts/error-handling/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ fn main() {
}
```

If `x` is not greater than zero, the program will panic with the message `"x must be greater than zero"`. `assert!` is helpful for checking invariants and preconditions without manually writing error-handling code.
If `x` is not greater than zero, the program will panic with the message `"x must be greater than zero"`.
`assert!` is helpful for checking invariants and preconditions without manually writing error-handling code.

### `nopanic` Notation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ In this exercise, you will be building error handling for a simple integer calcu
The calculator should support addition, multiplication, and division operations, returning the result as a formatted string.
You will also implement error handling to address illegal operations and division by zero.

The goal is to have a working calculator that returns a string in the following format: `16 + 51 = 67`, when provided with arguments `16`, `51`, and `+`.
The goal is to have a working calculator that returns a string in the following format:

```rust
SimpleCalculator::calculate(16, 51, "+"); // => returns "16 + 51 = 67"
Expand Down

0 comments on commit bc95bd8

Please sign in to comment.