1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-04-21 15:35:53 +02:00

Fix issues in std-types/result.md (#2186)

The expression excercise is using the standard `Result` type instead of
`Res`.

Co-authored-by: Jason Lin <lxj@google.com>
This commit is contained in:
Jason Lin 2024-07-06 01:04:46 +10:00 committed by GitHub
parent 25b9dff9d0
commit a64516a7e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,9 +5,8 @@ minutes: 5
# Result # Result
`Result` is similar to `Option`, but indicates the success or failure of an `Result` is similar to `Option`, but indicates the success or failure of an
operation, each with a different type. This is similar to the `Res` defined in operation, each with a different enum variant. It is generic: `Result<T, E>`
the expression exercise, but generic: `Result<T, E>` where `T` is used in the where `T` is used in the `Ok` variant and `E` appears in the `Err` variant.
`Ok` variant and `E` appears in the `Err` variant.
```rust,editable ```rust,editable
use std::fs::File; use std::fs::File;