File: use-indexmap2-for-preserve-order.patch

package info (click to toggle)
rust-schemars 0.8.22-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,312 kB
  • sloc: makefile: 2
file content (31 lines) | stat: -rw-r--r-- 1,103 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -413,7 +413,7 @@ derive = ["schemars_derive"]
 derive_json_schema = ["impl_json_schema"]
 impl_json_schema = ["derive"]
 indexmap1 = ["indexmap"]
-preserve_order = ["indexmap"]
+preserve_order = ["indexmap2"]
 raw_value = ["serde_json/raw_value"]
 ui_test = []
 uuid = ["uuid08"]
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -9,7 +9,7 @@
 #[cfg(not(feature = "preserve_order"))]
 pub type Map<K, V> = std::collections::BTreeMap<K, V>;
 #[cfg(feature = "preserve_order")]
-pub type Map<K, V> = indexmap::IndexMap<K, V>;
+pub type Map<K, V> = indexmap2::IndexMap<K, V>;
 /// The set type used by schemars types.
 ///
 /// Currently a `BTreeSet`, but this may change to a different implementation
@@ -23,7 +23,7 @@ pub type Set<T> = std::collections::BTre
 #[cfg(not(feature = "preserve_order"))]
 pub type MapEntry<'a, K, V> = std::collections::btree_map::Entry<'a, K, V>;
 #[cfg(feature = "preserve_order")]
-pub type MapEntry<'a, K, V> = indexmap::map::Entry<'a, K, V>;
+pub type MapEntry<'a, K, V> = indexmap2::map::Entry<'a, K, V>;
 
 mod flatten;
 mod json_schema_impls;