You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 7, 2023. It is now read-only.
Not the RustPolice but the thing I see is that the apt_repos.rs Package::fields should be statically defined in a struct with some of them being an Option if needed.
This is the most "unrusty" thing about your code. Using a HashMap like this is whats called "stringly typed" code. It's ignoring the power of the type system to clearly define the state of the data expected to keep the error boundary right at ingestion.
Enforce your error boundary as you ingest data from outside and then inside code can rely on clearly Type facts about the data ingested.
I think if you change that idea in apt_repo.rs the rest of your code will clean up from there.
Try using match against values in the struct further into your code for example.