aurae-runtime / aurae

Distributed systems runtime daemon written in Rust.
https://aurae.io
Apache License 2.0
1.85k stars 91 forks source link

Safer (less error prone to dev) main.rs #416

Closed future-highway closed 1 year ago

future-highway commented 1 year ago

Inspired by #414, I reworked auraed's main.rs to make it less error prone to dev(s like me).

Between the lints and borrow checker, the previous mistakes should be caught right away. There's still the possibility of switching multiple fields, but reusing a field is prevented (as is not using a field unless explicitly ignored).