Commit ec3cac9
committed
Merge #1500: Overhaul stats: Improve torrent-repository package before adding events (part 2)
4d91738 refactor: [#1495] renamings in torrent-repository pkg (Jose Celano)
5b3142f refactor: [#1495] refactor Swarms::upsert_peer (Jose Celano)
5c2c1e0 feat: [#1495] add len and is_empty methods to Swarms type (Jose Celano)
31f1fbf refactgor: [#1495] make field private (Jose Celano)
6d50fa0 refactor: [#1495] remove panics from Swarms type (Jose Celano)
5413e59 refactor: [#1495] renamings to follow latest changes in torrent-repository pkg (Jose Celano)
6f5cb27 refactor: [#1495] remove test for SwarmHandle (Jose Celano)
Pull request description:
Improve `torrent-repository` package before adding events.
This is a continuation of [tracker/issues/1495](#1497).
#### Refactoring `TorrentRepository`
- [x] Return errors instead of panicking in `Swarms` type.
- [x] Make field `swarms` private.
- [x] Add `len` and `is_empty` methods.
- [x] Refactor `upsert_peer`.
- [x] Renamings to follow the latest changes in type names.
ACKs for top commit:
josecelano:
ACK 4d91738
Tree-SHA512: 4ee9be1c21a62148d0d4fa0a9263c54312239fc98e2540d7583689a50126883ba563b5c676a606196c5696b14a4452a14061159b3ac2c69dd02c493c7930ceafFile tree
10 files changed
+390
-374
lines changed- packages
- torrent-repository
- src
- tests
- common
- swarms
- swarm
- tracker-core/src/torrent/repository
10 files changed
+390
-374
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
0 commit comments