File tree 1 file changed +5
-8
lines changed 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -263,15 +263,12 @@ let four_is_smaller = four <= ten;
263
263
let four_equals_ten = four == ten;
264
264
```
265
265
266
- This may seem rather limiting, particularly equality being invalid; in
267
- many cases however, it's unnecessary. Rust provides the [ ` match ` ] [ match ]
268
- keyword, which will be examined in more detail in the next section, which
269
- often allows better and easier branch control than a series of ` if ` /` else `
270
- statements would. However, for our [ game] [ game ] we need the comparisons
271
- to work so we will utilize the ` Ordering ` ` enum ` provided by the standard
272
- library which supports such comparisons. It has this form:
266
+ This may seem rather limiting, but it's a limitation which we can overcome.
267
+ There are two ways: by implementing equality ourselves, or by using the
268
+ [ ` match ` ] [ match ] keyword. We don't know enough about Rust to implement equality
269
+ yet, but we can use the ` Ordering ` enum from the standard library, which does:
273
270
274
- ``` {rust}
271
+ ```
275
272
enum Ordering {
276
273
Less,
277
274
Equal,
You can’t perform that action at this time.
0 commit comments