feat: reorganize workbook into 3 tracks (core, engineering-2026, ecosystems)
This commit is contained in:
1 parent
82677455b2
commit
2e002b6176
64 files changed
+2295
-196
No files matched your search
@@ -0,0 +1,16 @@
|
||||
# 04 — Kolekcje i Obsługa Błędów
|
||||
|
||||
## Zakres
|
||||
* `Vec<T>`, `HashMap<K, V>`, `String`
|
||||
* `Result<T, E>` i operator propagacji błędów `?`
|
||||
* Własne typy błędów (`enum`)
|
||||
|
||||
## Zadania (`src/lib.rs`)
|
||||
1. `word_counts(text: &str) -> HashMap<String, usize>` — policz wystąpienia słów (case-insensitive).
|
||||
2. `parse_positive_i32(input: &str) -> Result<i32, ParsePositiveError>` — sparsuj tekst do `i32` i odrzuć wartości `<= 0`.
|
||||
3. `sum_parsed_positives(inputs: &[&str]) -> Result<i32, ParsePositiveError>` — zsumuj listę tekstów, propagując pierwszy błąd przez `?`.
|
||||
|
||||
## Uruchomienie testów
|
||||
```bash
|
||||
make test PKG=core04-collections-errors
|
||||
```
|
||||
Reference in new issue
Block a user