[PR #23] [MERGED] fix: outputted keys not in same order as input #32

Closed
opened 2026-05-22 22:05:15 +01:00 by JakeStanger · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/corn-config/corn/pull/23
Author: @JakeStanger
Created: 9/14/2023
Status: Merged
Merged: 9/14/2023
Merged by: @JakeStanger

Base: masterHead: fix/key-order


📝 Commits (1)

  • d124160 fix: outputted keys not in same order as input

📊 Changes

46 files changed (+356 additions, -329 deletions)

View changed files

📝 Cargo.lock (+27 -3)
📝 assets/outputs/json/boolean.json (+2 -2)
📝 assets/outputs/json/chained_complex.json (+2 -2)
📝 assets/outputs/json/compact.json (+33 -33)
📝 assets/outputs/json/complex.json (+23 -23)
📝 assets/outputs/json/complex_keys.json (+7 -7)
📝 assets/outputs/json/float.json (+2 -2)
📝 assets/outputs/json/input.json (+4 -4)
📝 assets/outputs/json/integer.json (+2 -2)
📝 assets/outputs/json/object_in_array.json (+2 -2)
📝 assets/outputs/json/readme_example.json (+18 -18)
📝 assets/outputs/json/spread.json (+1 -1)
📝 assets/outputs/json/string.json (+1 -1)
📝 assets/outputs/json/string_interpolation.json (+2 -2)
📝 assets/outputs/json/very_compact.json (+33 -33)
📝 assets/outputs/toml/boolean.toml (+1 -1)
📝 assets/outputs/toml/chained_complex.toml (+1 -1)
📝 assets/outputs/toml/compact.toml (+21 -21)
📝 assets/outputs/toml/complex.toml (+13 -13)
📝 assets/outputs/toml/complex_keys.toml (+6 -6)

...and 26 more files

📄 Description

This switches the BTreeMap implementation for objects out for an IndexMap, which means the order you write keys in is always preserved.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/corn-config/corn/pull/23 **Author:** [@JakeStanger](https://github.com/JakeStanger) **Created:** 9/14/2023 **Status:** ✅ Merged **Merged:** 9/14/2023 **Merged by:** [@JakeStanger](https://github.com/JakeStanger) **Base:** `master` ← **Head:** `fix/key-order` --- ### 📝 Commits (1) - [`d124160`](https://github.com/corn-config/corn/commit/d124160ca425cd071ab269a5d2baf48035476798) fix: outputted keys not in same order as input ### 📊 Changes **46 files changed** (+356 additions, -329 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+27 -3) 📝 `assets/outputs/json/boolean.json` (+2 -2) 📝 `assets/outputs/json/chained_complex.json` (+2 -2) 📝 `assets/outputs/json/compact.json` (+33 -33) 📝 `assets/outputs/json/complex.json` (+23 -23) 📝 `assets/outputs/json/complex_keys.json` (+7 -7) 📝 `assets/outputs/json/float.json` (+2 -2) 📝 `assets/outputs/json/input.json` (+4 -4) 📝 `assets/outputs/json/integer.json` (+2 -2) 📝 `assets/outputs/json/object_in_array.json` (+2 -2) 📝 `assets/outputs/json/readme_example.json` (+18 -18) 📝 `assets/outputs/json/spread.json` (+1 -1) 📝 `assets/outputs/json/string.json` (+1 -1) 📝 `assets/outputs/json/string_interpolation.json` (+2 -2) 📝 `assets/outputs/json/very_compact.json` (+33 -33) 📝 `assets/outputs/toml/boolean.toml` (+1 -1) 📝 `assets/outputs/toml/chained_complex.toml` (+1 -1) 📝 `assets/outputs/toml/compact.toml` (+21 -21) 📝 `assets/outputs/toml/complex.toml` (+13 -13) 📝 `assets/outputs/toml/complex_keys.toml` (+6 -6) _...and 26 more files_ </details> ### 📄 Description This switches the `BTreeMap` implementation for objects out for an `IndexMap`, which means the order you write keys in is always preserved. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
JakeStanger 2026-05-22 22:05:15 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
corn-config/corn#32
No description provided.