bug40485.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. diff --git a/components/support/nimbus-fml/src/parser.rs b/components/support/nimbus-fml/src/parser.rs
  2. index 2498445c..dbc814a3 100644
  3. --- a/components/support/nimbus-fml/src/parser.rs
  4. +++ b/components/support/nimbus-fml/src/parser.rs
  5. @@ -2,7 +2,7 @@
  6. * License, v. 2.0. If a copy of the MPL was not distributed with this
  7. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  8. -use std::{collections::HashMap, path::Path};
  9. +use std::{collections::BTreeMap, collections::HashMap, path::Path};
  10. use serde::{Deserialize, Serialize};
  11. use serde_json::json;
  12. @@ -24,7 +24,7 @@ pub(crate) struct EnumVariantBody {
  13. #[serde(deny_unknown_fields)]
  14. pub(crate) struct EnumBody {
  15. description: String,
  16. - variants: HashMap<String, EnumVariantBody>,
  17. + variants: BTreeMap<String, EnumVariantBody>,
  18. }
  19. #[derive(Debug, Deserialize, Serialize, Clone)]
  20. @@ -43,23 +43,23 @@ pub(crate) struct FieldBody {
  21. pub(crate) struct ObjectBody {
  22. description: String,
  23. failable: Option<bool>,
  24. - fields: HashMap<String, FieldBody>,
  25. + fields: BTreeMap<String, FieldBody>,
  26. }
  27. #[derive(Debug, Deserialize, Serialize, Clone, Default)]
  28. #[serde(deny_unknown_fields)]
  29. pub(crate) struct Types {
  30. #[serde(default)]
  31. - enums: HashMap<String, EnumBody>,
  32. + enums: BTreeMap<String, EnumBody>,
  33. #[serde(default)]
  34. - objects: HashMap<String, ObjectBody>,
  35. + objects: BTreeMap<String, ObjectBody>,
  36. }
  37. #[derive(Debug, Deserialize, Serialize, Clone)]
  38. #[serde(deny_unknown_fields)]
  39. pub(crate) struct FeatureBody {
  40. description: String,
  41. - variables: HashMap<String, FieldBody>,
  42. + variables: BTreeMap<String, FieldBody>,
  43. #[serde(alias = "defaults")]
  44. default: Option<serde_json::Value>,
  45. }
  46. @@ -71,7 +71,7 @@ pub(crate) struct ManifestFrontEnd {
  47. #[serde(default)]
  48. #[serde(rename = "types")]
  49. legacy_types: Option<Types>,
  50. - features: HashMap<String, FeatureBody>,
  51. + features: BTreeMap<String, FeatureBody>,
  52. channels: Vec<String>,
  53. // If a types attribute isn't explicitly expressed,