Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rust-101
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
orestis.malaspin
rust-101
Commits
5d329222
Verified
Commit
5d329222
authored
1 year ago
by
Michaël El Kharroubi
Browse files
Options
Downloads
Patches
Plain Diff
Changed small stuff
parent
0aff1f0b
No related branches found
No related tags found
1 merge request
!51
Errors management
Pipeline
#26094
failed
1 year ago
Stage: test
Stage: build
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
book/src/part07.md
+3
-3
3 additions, 3 deletions
book/src/part07.md
with
3 additions
and
3 deletions
book/src/part07.md
+
3
−
3
View file @
5d329222
...
...
@@ -130,7 +130,7 @@ optionnelle.
Voici sa déclaration d'après la documentation Rust :
```
rust
,ignore
```
rust
pub
enum
Option
<
T
>
{
None
,
Some
(
T
),
...
...
@@ -198,7 +198,7 @@ fn main() {
Si on exécute ce code, on obtien l'erreur suivante :
```
bash
```
console
Compiling playground v0.0.1 (/playground)
Finished dev [unoptimized + debuginfo] target(s) in 0.41s
Running `target/debug/playground`
...
...
@@ -240,7 +240,7 @@ un état indeterminé, c'est à dire un erreur irrattrapable.
Le Rust offre une solution plus élégante que d'interrompre l'exécution du programme pour gérer les erreurs. Il s'agit
comme pour
`Option<T>`
d'un type énuméré. Voici sa définition :
```
rust
,ignore
```
rust
enum
Result
<
T
,
E
>
{
Ok
(
T
),
Err
(
E
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment