This patch removes the GraphBuilder from the ChangeGraph and simplifies the ChangeGraph::load method. Thus it makes the affected code shorter and easier to understand.
I stumbled across this while learning the codebase and found it very confusing. So I rewrote it for the sake of my own understanding and to apply my newly learned Rust skills.
The result looks quite nice, so I hope it is of some value to you as well :D
This patch removes the GraphBuilder from the ChangeGraph and simplifies the ChangeGraph::load method. Thus it makes the affected code shorter and easier to understand.
I stumbled across this while learning the codebase and found it very confusing. So I rewrote it for the sake of my own understanding and to apply my newly learned Rust skills.
The result looks quite nice, so I hope it is of some value to you as well :D
Heya, thanks for the contribution! While this definitely looks like simpler code, it does not seem to pass the tests :’)
You can run the tests for that crate by doing cargo test -p radicle-cobs (or check out cargo-nextest).
Once they’re passing, you can move on to cargo test -p radicle
Fix the failing tests
I’m terribly sorry D: This slipped through my last local changes. I usually test my code! Still thanks for the interesting cargo-nextest reference.
Thanks! Confirmed that the tests worked and it really is much cleaer what’s going on now :)
Rebased