Skip to content

Commit 5a8574e

Browse files
committed
feedback lesson0
1 parent fbbc673 commit 5a8574e

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

_posts/2024-01-25-lesson0.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ permalink: /lesson0/
88

99
## Lesson 0: CP
1010

11-
## Co relation to the C language usage
11+
### Co-relation with C
1212

1313
1. **Args**: `env::args()``argc/argv` (Rust is type-safe)
1414
2. **Files**: `File::open()``fopen()` (`Result<>` vs `NULL`)
@@ -17,7 +17,7 @@ permalink: /lesson0/
1717
5. **Memory**: Auto `drop()` ↔ Manual `fclose()`
1818
6. **Exit**: `process::exit()``exit()` (same codes)
1919

20-
## Rust Concepts for this Lesson
20+
### Rust Concepts for this Lesson
2121

2222
1. **Result Type**: Rust uses `Result<T, E>` for error handling
2323
- `Ok(T)`: Success case with value of type T
@@ -41,8 +41,6 @@ permalink: /lesson0/
4141
- UTF-8 validation built-in
4242

4343
```rust
44-
45-
4644
// Variable (1): `args`. Type: `Vec<String>`. Stores
4745
// command-line arguments as strings, where args[0] is
4846
// the program's path.
@@ -173,10 +171,6 @@ fn main() {
173171
}
174172
}
175173

176-
177-
178-
179-
180174
```
181175

182176
## Exercise

0 commit comments

Comments
 (0)