Codebase list rust-libslirp / 3eb0806
config - bump dependency on rust-ini Peter Michael Green 2 years ago
4 changed file(s) with 37 addition(s) and 108 deletion(s). Raw diff Collapse all Expand all
0 rust-config (0.11.0-2) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
1
2 * Team upload.
3 * Package config 0.11.0 from crates.io using debcargo 2.5.0
4 * Bump rust-ini dependency to 0.17
5 * Move rust-ini from delete-hjson-support-due-to-security-problems.patch
6 to new patch relax-dep.patch
7
8 -- Peter Michael Green <plugwash@debian.org> Mon, 20 Dec 2021 01:31:37 +0000
9
010 rust-config (0.11.0-1) unstable; urgency=medium
111
212 * Package config 0.11.0 from crates.io using debcargo 2.4.4
0 diff --git a/Cargo.toml b/Cargo.toml
1 index 751911f..3a5a5a9 100644
20 --- a/Cargo.toml
31 +++ b/Cargo.toml
4 @@ -28,17 +28,12 @@ version = "1.0"
5 version = "5.0.0"
6
7 [dependencies.rust-ini]
8 -version = "0.13"
9 +version = "0.16"
10 optional = true
11
12 [dependencies.serde]
13 version = "1.0.8"
2 @@ -36,7 +36,2 @@
143
154 -[dependencies.serde-hjson]
165 -version = "0.9"
187 -default-features = false
198 -
209 [dependencies.serde_json]
21 version = "1.0.2"
22 optional = true
23 @@ -61,8 +56,7 @@ version = "0.6"
24 version = "1.0.8"
25
10 @@ -63,4 +58,3 @@
2611 [features]
2712 -default = ["toml", "json", "yaml", "hjson", "ini"]
2813 -hjson = ["serde-hjson"]
2914 +default = ["toml", "json", "yaml", "ini"]
3015 ini = ["rust-ini"]
31 json = ["serde_json"]
32 yaml = ["yaml-rust"]
33 diff --git a/src/file/format/hjson.rs b/src/file/format/hjson.rs
34 deleted file mode 100644
35 index 457cfbf..0000000
3616 --- a/src/file/format/hjson.rs
3717 +++ /dev/null
3818 @@ -1,55 +0,0 @@
9171 - serde_hjson::Value::Null => Value::new(uri, ValueKind::Nil),
9272 - }
9373 -}
94 diff --git a/src/file/format/ini.rs b/src/file/format/ini.rs
95 index e5a109f..4395c45 100644
9674 --- a/src/file/format/ini.rs
9775 +++ b/src/file/format/ini.rs
98 @@ -11,17 +11,17 @@ pub fn parse(
99 let mut map: HashMap<String, Value> = HashMap::new();
100 let i = Ini::load_from_str(text)?;
76 @@ -13,3 +13,3 @@
10177 for (sec, prop) in i.iter() {
10278 - match *sec {
10379 + match sec {
10480 Some(ref sec) => {
105 let mut sec_map: HashMap<String, Value> = HashMap::new();
81 @@ -17,5 +17,5 @@
10682 for (k, v) in prop.iter() {
10783 - sec_map.insert(k.clone(), Value::new(uri, ValueKind::String(v.clone())));
10884 + sec_map.insert(k.to_owned(), Value::new(uri, ValueKind::String(v.to_owned())));
11086 - map.insert(sec.clone(), Value::new(uri, ValueKind::Table(sec_map)));
11187 + map.insert((*sec).to_owned(), Value::new(uri, ValueKind::Table(sec_map)));
11288 }
113 None => {
89 @@ -23,3 +23,3 @@
11490 for (k, v) in prop.iter() {
11591 - map.insert(k.clone(), Value::new(uri, ValueKind::String(v.clone())));
11692 + map.insert(k.to_owned(), Value::new(uri, ValueKind::String(v.to_owned())));
11793 }
118 }
119 }
120 diff --git a/src/file/format/mod.rs b/src/file/format/mod.rs
121 index f46ae13..819644f 100644
12294 --- a/src/file/format/mod.rs
12395 +++ b/src/file/format/mod.rs
124 @@ -16,9 +16,6 @@ mod json;
125 #[cfg(feature = "yaml")]
126 mod yaml;
96 @@ -18,5 +18,2 @@
12797
12898 -#[cfg(feature = "hjson")]
12999 -mod hjson;
130100 -
131101 #[cfg(feature = "ini")]
132 mod ini;
133
134 @@ -36,9 +33,6 @@ pub enum FileFormat {
135 #[cfg(feature = "yaml")]
136 Yaml,
102 @@ -38,5 +35,2 @@
137103
138104 - /// HJSON (parsed with serde_hjson)
139105 - #[cfg(feature = "hjson")]
140106 - Hjson,
141107 /// INI (parsed with rust_ini)
142 #[cfg(feature = "ini")]
143 Ini,
144 @@ -59,9 +53,6 @@ lazy_static! {
145 #[cfg(feature = "yaml")]
146 formats.insert(FileFormat::Yaml, vec!["yaml", "yml"]);
108 @@ -61,5 +55,2 @@
147109
148110 - #[cfg(feature = "hjson")]
149111 - formats.insert(FileFormat::Hjson, vec!["hjson"]);
150112 -
151113 #[cfg(feature = "ini")]
152 formats.insert(FileFormat::Ini, vec!["ini"]);
153
154 @@ -97,9 +88,6 @@ impl FileFormat {
155 #[cfg(feature = "yaml")]
156 FileFormat::Yaml => yaml::parse(uri, text),
114 @@ -99,5 +90,2 @@
157115
158116 - #[cfg(feature = "hjson")]
159117 - FileFormat::Hjson => hjson::parse(uri, text),
160118 -
161119 #[cfg(feature = "ini")]
162 FileFormat::Ini => ini::parse(uri, text),
163 }
164 diff --git a/src/lib.rs b/src/lib.rs
165 index a47a671..6f0079c 100644
166120 --- a/src/lib.rs
167121 +++ b/src/lib.rs
168 @@ -45,9 +45,6 @@ extern crate serde_json;
169 #[cfg(feature = "yaml")]
170 extern crate yaml_rust;
122 @@ -47,5 +47,2 @@
171123
172124 -#[cfg(feature = "hjson")]
173125 -extern crate serde_hjson;
174126 -
175127 #[cfg(feature = "ini")]
176 extern crate ini;
177
178 diff --git a/tests/Settings-invalid.hjson b/tests/Settings-invalid.hjson
179 deleted file mode 100644
180 index 7e31ec3..0000000
181128 --- a/tests/Settings-invalid.hjson
182129 +++ /dev/null
183130 @@ -1,4 +0,0 @@
185132 - ok: true,
186133 - error
187134 -}
188 diff --git a/tests/Settings.hjson b/tests/Settings.hjson
189 deleted file mode 100644
190 index 3e04ccf..0000000
191135 --- a/tests/Settings.hjson
192136 +++ /dev/null
193137 @@ -1,16 +0,0 @@
207151 - }
208152 - }
209153 -}
210 diff --git a/tests/datetime.rs b/tests/datetime.rs
211 index 6c1e620..7ee8ec3 100644
212154 --- a/tests/datetime.rs
213155 +++ b/tests/datetime.rs
214 @@ -1,7 +1,6 @@
215 #![cfg(all(
216 feature = "toml",
156 @@ -3,3 +3,2 @@
217157 feature = "json",
218158 - feature = "hjson",
219159 feature = "yaml",
220 feature = "ini",
221 ))]
222 @@ -37,15 +36,6 @@ fn make() -> Config {
223 FileFormat::Toml,
224 ))
225 .unwrap()
226 - .merge(File::from_str(
227 - r#"
160 @@ -41,11 +40,2 @@
161 r#"
228162 - {
229163 - "hjson_datetime": "2017-05-10T02:14:53Z"
230164 - }
232166 - FileFormat::Hjson,
233167 - ))
234168 - .unwrap()
235 .merge(File::from_str(
236 r#"
169 - .merge(File::from_str(
170 - r#"
237171 ini_datetime = 2017-05-10T02:14:53Z
238 @@ -75,11 +65,6 @@ fn test_datetime_string() {
239
240 assert_eq!(&date, "2017-06-12T10:58:30Z");
172 @@ -77,7 +67,2 @@
241173
242174 - // HJSON
243175 - let date: String = s.get("hjson_datetime").unwrap();
245177 - assert_eq!(&date, "2017-05-10T02:14:53Z");
246178 -
247179 // INI
248 let date: String = s.get("ini_datetime").unwrap();
249
250 @@ -105,11 +90,6 @@ fn test_datetime() {
251
252 assert_eq!(date, Utc.ymd(2017, 6, 12).and_hms(10, 58, 30));
180 @@ -107,7 +92,2 @@
253181
254182 - // HJSON
255183 - let date: DateTime<Utc> = s.get("hjson_datetime").unwrap();
257185 - assert_eq!(date, Utc.ymd(2017, 5, 10).and_hms(2, 14, 53));
258186 -
259187 // INI
260 let date: DateTime<Utc> = s.get("ini_datetime").unwrap();
261
262 diff --git a/tests/file.rs b/tests/file.rs
263 index 0680c2a..bef0669 100644
264188 --- a/tests/file.rs
265189 +++ b/tests/file.rs
266 @@ -49,7 +49,7 @@ fn test_file_auto_not_found() {
267 #[test]
268 fn test_file_ext() {
190 @@ -51,3 +51,3 @@
269191 let mut c = Config::default();
270192 - c.merge(File::with_name("tests/Settings.json")).unwrap();
271193 + c.merge(File::with_name("tests/Settings.yaml")).unwrap();
272194
273 assert_eq!(c.get("debug").ok(), Some(true));
274 assert_eq!(c.get("production").ok(), Some(false));
275 diff --git a/tests/file_hjson.rs b/tests/file_hjson.rs
276 deleted file mode 100644
277 index 87318eb..0000000
278195 --- a/tests/file_hjson.rs
279196 +++ /dev/null
280197 @@ -1,80 +0,0 @@
358275 - format!("Found a punctuator where a key name was expected (check your syntax or use quotes if the key name includes {{}}[],: or whitespace) at line 4 column 1 in {}", path.display())
359276 - );
360277 -}
361 diff --git a/tests/file_ini.rs b/tests/file_ini.rs
362 index 088eb2c..6dc3522 100644
363278 --- a/tests/file_ini.rs
364279 +++ b/tests/file_ini.rs
365 @@ -64,7 +64,7 @@ fn test_error_parse() {
366 assert_eq!(
367 res.unwrap_err().to_string(),
280 @@ -66,3 +66,3 @@
368281 format!(
369282 - r#"2:0 Expecting "[Some('='), Some(':')]" but found EOF. in {}"#,
370283 + r#"2:0 expecting "[Some('='), Some(':')]" but found EOF. in {}"#,
371284 path.display()
372 )
373 );
0 --- a/Cargo.toml
1 +++ b/Cargo.toml
2 @@ -30,3 +30,3 @@
3 [dependencies.rust-ini]
4 -version = "0.13"
5 +version = "0.17"
6 optional = true
00 delete-hjson-support-due-to-security-problems.patch
11 fix-tests.patch
2 relax-dep.patch