Source: rust-rust-ini Followup-For: Bug #1089138 X-Debbugs-Cc: noisyc...@tutanota.com Control: tags -1 patch
Hi, rust-rust-ini fails to migrate to testing because rust-trim-in-place has been stuck in NEW for quite a while. In case the latter doesn't pass the NEW queue before autoremoval, I'm attaching a patch to decouple rust-rust-ini from it. The patch is to be imported with quilt. Cheers!
>From 19548da2f8b520d5b8177e801503aac18d9204c4 Mon Sep 17 00:00:00 2001 From: NoisyCoil <noisyc...@tutanota.com> Date: Sun, 15 Dec 2024 12:46:33 +0100 Subject: [PATCH] Temporarily patch-out trim_in_place Avoids autoremoval of a large number of packages due to trim_in_place being stuck in NEW and blocking migration of rust-ini to testing. Remove this patch when trim_in_place lands in unstable. --- Cargo.toml | 4 ++-- src/lib.rs | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) --- a/Cargo.toml +++ b/Cargo.toml @@ -48,8 +48,8 @@ version = ">= 0.3, < 0.5" #version = "0.7" -[dependencies.trim-in-place] -version = "0.1.7" +#[dependencies.trim-in-place] +#version = "0.1.7" [dependencies.unicase] version = "2.6" --- a/src/lib.rs +++ b/src/lib.rs @@ -58,7 +58,7 @@ list_ordered_multimap::{Entry, IntoIter, Iter, IterMut, OccupiedEntry, VacantEntry}, ListOrderedMultimap, }; -use trim_in_place::TrimInPlace; +//use trim_in_place::TrimInPlace; #[cfg(feature = "case-insensitive")] use unicase::UniCase; @@ -1326,8 +1326,8 @@ self.parse_comment(); } '[' => match self.parse_section() { - Ok(mut sec) => { - sec.trim_in_place(); + Ok(sec) => { + let sec = sec.trim().to_string(); cursec = Some(sec); match result.entry(cursec.clone()) { SectionEntry::Vacant(v) => { @@ -1345,8 +1345,8 @@ return self.error("missing key"); } match self.parse_val() { - Ok(mut mval) => { - mval.trim_in_place(); + Ok(mval) => { + let mval = mval.trim(); match result.entry(cursec.clone()) { SectionEntry::Vacant(v) => { // cursec must be None (the General Section) @@ -1365,8 +1365,8 @@ } } _ => match self.parse_key() { - Ok(mut mkey) => { - mkey.trim_in_place(); + Ok(mkey) => { + let mkey = mkey.trim().to_string(); curkey = mkey; } Err(e) => return Err(e),