File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ permalink: /lesson0/
8
8
9
9
## Lesson 0: CP
10
10
11
- ## Co relation to the C language usage
11
+ ### Co- relation with C
12
12
13
13
1 . ** Args** : ` env::args() ` ↔ ` argc/argv ` (Rust is type-safe)
14
14
2 . ** Files** : ` File::open() ` ↔ ` fopen() ` (` Result<> ` vs ` NULL ` )
@@ -17,7 +17,7 @@ permalink: /lesson0/
17
17
5 . ** Memory** : Auto ` drop() ` ↔ Manual ` fclose() `
18
18
6 . ** Exit** : ` process::exit() ` ↔ ` exit() ` (same codes)
19
19
20
- ## Rust Concepts for this Lesson
20
+ ### Rust Concepts for this Lesson
21
21
22
22
1 . ** Result Type** : Rust uses ` Result<T, E> ` for error handling
23
23
- ` Ok(T) ` : Success case with value of type T
@@ -41,8 +41,6 @@ permalink: /lesson0/
41
41
- UTF-8 validation built-in
42
42
43
43
``` rust
44
-
45
-
46
44
// Variable (1): `args`. Type: `Vec<String>`. Stores
47
45
// command-line arguments as strings, where args[0] is
48
46
// the program's path.
@@ -173,10 +171,6 @@ fn main() {
173
171
}
174
172
}
175
173
176
-
177
-
178
-
179
-
180
174
```
181
175
182
176
## Exercise
You can’t perform that action at this time.
0 commit comments