File: rust-ini-0.18.diff

package info (click to toggle)
rust-coreutils 0.0.30-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 17,388 kB
  • sloc: sh: 1,088; python: 407; javascript: 72; makefile: 51
file content (30 lines) | stat: -rw-r--r-- 1,095 bytes parent folder | download | duplicates (2)
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
This patch reverts part of https://github.com/uutils/coreutils/commit/19901055a24b7c4cd2446b5e05ab572b1d81318d
it seems removing the .iter fixes a warning with newer rust-ini but breaks
the build with older rust-ini

Index: coreutils/Cargo.toml
===================================================================
--- coreutils.orig/Cargo.toml
+++ coreutils/Cargo.toml
@@ -327,7 +327,7 @@ rand_core = "0.9.0"
 rayon = "1"
 regex = "1"
 rstest = "0.25.0"
-rust-ini = "0.21.0"
+rust-ini = ">= 0.18.0"
 same-file = "1.0.6"
 self_cell = "1"
 # Remove the "=" once we moved to Rust edition 2024
Index: coreutils/src/uu/env/src/env.rs
===================================================================
--- coreutils.orig/src/uu/env/src/env.rs
+++ coreutils/src/uu/env/src/env.rs
@@ -162,7 +162,7 @@ fn load_config_file(opts: &mut Options)
 
         for (_, prop) in &conf {
             // ignore all INI section lines (treat them as comments)
-            for (key, value) in prop {
+            for (key, value) in prop.iter() {
                 env::set_var(key, value);
             }
         }