From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id A7BBA1FF17C for ; Wed, 3 Sep 2025 10:57:44 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 64B662E6C1; Wed, 3 Sep 2025 10:57:59 +0200 (CEST) Date: Wed, 3 Sep 2025 10:57:56 +0200 From: Wolfgang Bumiller To: Lukas Wagner Message-ID: <2gi6vafdily27shp4wjp74hbmcew3e23jshhyzwcfteaf2nvzm@zklwtcm6zw56> References: <20250902151427.425017-1-l.wagner@proxmox.com> <20250902151427.425017-3-l.wagner@proxmox.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250902151427.425017-3-l.wagner@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1756889861949 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.074 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_MSPIKE_H2 0.001 Average reputation (+2) RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [schema2rust.pm] Subject: [pdm-devel] applied: [PATCH proxmox-api-types 1/3] Schema2Rust: fix handling of non-optional params X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Cc: pdm-devel@lists.proxmox.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" applied, thanks On Tue, Sep 02, 2025 at 05:14:19PM +0200, Lukas Wagner wrote: > Signed-off-by: Lukas Wagner > --- > pve-api-types/generator-lib/Schema2Rust.pm | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/pve-api-types/generator-lib/Schema2Rust.pm b/pve-api-types/generator-lib/Schema2Rust.pm > index 77cb373..436ba76 100644 > --- a/pve-api-types/generator-lib/Schema2Rust.pm > +++ b/pve-api-types/generator-lib/Schema2Rust.pm > @@ -497,8 +497,10 @@ my sub print_method_without_body : prototype($$$$$) { > print {$out} " .maybe_bool_arg(\"$name\", p_$rust_name)\n"; > } elsif ($arg->{is_string_list}) { > print {$out} " .maybe_list_arg(\"$name\", p_$rust_name)\n"; > - } else { > + } elsif ($arg->{optional}) { > print {$out} " .maybe_arg(\"$name\", &p_$rust_name)\n"; > + } else { > + print {$out} " .arg(\"$name\", &p_$rust_name)\n"; > } > } > print {$out} " .build();\n"; > @@ -517,12 +519,15 @@ my sub print_method_without_body : prototype($$$$$) { > for my $arg (@$input) { > my $name = $arg->{name}; > my $rust_name = $arg->{rust_name}; > + > if ($arg->{type} eq 'Option') { > print {$out} " .maybe_bool_arg(\"$name\", $rust_name)\n"; > } elsif ($arg->{is_string_list}) { > print {$out} " .maybe_list_arg(\"$name\", &$rust_name)\n"; > - } else { > + } elsif ($arg->{optional}) { > print {$out} " .maybe_arg(\"$name\", &$rust_name)\n"; > + } else { > + print {$out} " .arg(\"$name\", &$rust_name)\n"; > } > } > print {$out} " .build();\n"; > -- > 2.47.2 _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel