Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sort addon list output issue #17 #18

Merged
merged 1 commit into from
Nov 26, 2021

Conversation

LowLevelLover
Copy link
Contributor

Fix #17 issue with create a vector of addon_status keys, then sort it.

@Trojan295
Copy link
Owner

Thanks @FarzinVatani for the contribution! Code works fine, although I'm curious, if this can be done simpler.

I think it could be done by just changing from a HashMap to a BTreeMap:

let mut addon_status: BTreeMap<String, Vec<String>> = BTreeMap::new();

This should ensure, that we will have an order, when iterating over the map.

@LowLevelLover
Copy link
Contributor Author

@Trojan295 Thanks for your hint, I changed the type of addon_status and now it works well.

@Trojan295 Trojan295 merged commit 7b1730a into Trojan295:master Nov 26, 2021
@Trojan295
Copy link
Owner

Trojan295 commented Nov 26, 2021

Awesome, thank you, @FarzinVatani ! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sort addon list output to make it idempotent
2 participants