Skip to content

Commit

Permalink
Fix LocalizationTable output order by switching to a BTreeMap.
Browse files Browse the repository at this point in the history
ACTUALLY closes #173.
  • Loading branch information
LPGhatguy committed Oct 15, 2019
1 parent 126040a commit 5d0aa11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Rojo Changelog

## Unreleased Changes
* Fixed an issue where `LocalizationTable` instances would have their column order randomized. ([#173](https://github.com/rojo-rbx/rojo/issues/173))

## [0.5.1](https://github.com/rojo-rbx/rojo/releases/tag/v0.5.1) (October 4, 2019)
* Fixed an issue where Rojo would drop changes if they happened too quickly ([#252](https://github.com/rojo-rbx/rojo/issues/252))
Expand Down
5 changes: 3 additions & 2 deletions server/src/rbx_snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use std::{
borrow::Cow,
collections::HashMap,
collections::{BTreeMap, HashMap},
fmt,
path::{Path, PathBuf},
str,
Expand Down Expand Up @@ -631,7 +631,8 @@ fn snapshot_csv_file<'source>(
#[serde(skip_serializing_if = "Option::is_none")]
source: Option<&'a str>,

values: HashMap<&'a str, &'a str>,
// We use a BTreeMap here to get deterministic output order.
values: BTreeMap<&'a str, &'a str>,
}

let instance_name = file.path
Expand Down

0 comments on commit 5d0aa11

Please sign in to comment.