From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id AA1A21FF0E0 for ; Thu, 23 Jul 2026 09:51:14 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id C7A5F21489; Thu, 23 Jul 2026 09:51:13 +0200 (CEST) Date: Thu, 23 Jul 2026 09:50:39 +0200 From: Wolfgang Bumiller To: "Max R. Carrara" Subject: partially-applied: [PATCH perlmod 2/4] value: implement serde::de::IntoDeserializer on Value Message-ID: References: <20260720152541.524463-1-m.carrara@proxmox.com> <20260720152541.524463-3-m.carrara@proxmox.com> <3s5aifg3nyfpu4vavjjdeelhvqztbztz6yohiqckwzma5cfgcu@fgpi73fbpevp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3s5aifg3nyfpu4vavjjdeelhvqztbztz6yohiqckwzma5cfgcu@fgpi73fbpevp> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1784793010037 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.350 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: SDHQAMMKWLDUAU4VHHWFTJDPN4DVQZDL X-Message-ID-Hash: SDHQAMMKWLDUAU4VHHWFTJDPN4DVQZDL X-MailFrom: w.bumiller@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: pve-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, Jul 23, 2026 at 09:34:51AM +0200, Wolfgang Bumiller wrote: > On Mon, Jul 20, 2026 at 05:25:38PM +0200, Max R. Carrara wrote: > > For better compatibility with serde, we implement > > `serde::de::IntoDeserializer` on `Value`. This allows us to skip > > explicitly converting to the `Value` deserializer in `perlmod::de`. > > > > Signed-off-by: Max R. Carrara > > --- > > perlmod-macro/src/function.rs | 2 +- > > perlmod/src/value.rs | 9 +++++++++ > > 2 files changed, 10 insertions(+), 1 deletion(-) > > > > diff --git a/perlmod-macro/src/function.rs b/perlmod-macro/src/function.rs > > index 0a4cf0e..8b5d689 100644 > > --- a/perlmod-macro/src/function.rs > > +++ b/perlmod-macro/src/function.rs > > @@ -136,7 +136,7 @@ impl ArgumentAttrs { > > let _guard = ::perlmod::__private__::InParameterDeserialization::guard(); > > match <#arg_type as ::perlmod::__private__::serde::Deserialize>::deserialize( > > ::perlmod::__private__::serde::de::value::SeqDeserializer::new( > > - #extracted_name.map(::perlmod::de::Deserializer::<'static>::from_value) > > + #extracted_name > > ) > > ) { > > Ok(arg) => arg, > > diff --git a/perlmod/src/value.rs b/perlmod/src/value.rs > > index 1240eb5..5c2d432 100644 > > --- a/perlmod/src/value.rs > > +++ b/perlmod/src/value.rs > > @@ -3,6 +3,7 @@ > > > > use std::fmt; > > > > +use serde::de::IntoDeserializer; > > For a single-use I'd rather skip the import. > > That said, if we do this at all, one might wonder whether `&'de Value` > should also be IntoDeserializer (via `de::from_ref_value`). Applied this and patch 1 anyway now. Could add this later if we need it.