public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Maximiliano Sandoval <m.sandoval@proxmox.com>
Cc: pdm-devel@lists.proxmox.com
Subject: Re: [pdm-devel] [PATCH proxmox-api-types 3/4] pve-api-types: Use &str instead of format!
Date: Tue, 14 Jan 2025 14:21:43 +0100	[thread overview]
Message-ID: <jpcieoad73h6p4p25mtidsphcqhwenq7h25ixj3zl6femxmigi@hhv3q76jsetk> (raw)
In-Reply-To: <20250113121224.302766-3-m.sandoval@proxmox.com>

Please don't patch code which, as indicated, is *generated*.
Patch the generator instead.
This change will be reverted automatically every time the code gets updated.

On Mon, Jan 13, 2025 at 01:12:23PM +0100, Maximiliano Sandoval wrote:
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
>  pve-api-types/src/generated/code.rs | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/pve-api-types/src/generated/code.rs b/pve-api-types/src/generated/code.rs
> index dc17cd9..3da259b 100644
> --- a/pve-api-types/src/generated/code.rs
> +++ b/pve-api-types/src/generated/code.rs
> @@ -764,8 +764,8 @@ where
>  
>      /// Authentication domain index.
>      async fn list_domains(&self) -> Result<Vec<ListRealm>, Error> {
> -        let url = format!("/api2/extjs/access/domains");
> -        Ok(self.0.get(&url).await?.expect_json()?.data)
> +        let url = "/api2/extjs/access/domains";
> +        Ok(self.0.get(url).await?.expect_json()?.data)
>      }
>  
>      /// LXC container index (per node).
> @@ -788,8 +788,8 @@ where
>  
>      /// Cluster node index.
>      async fn list_nodes(&self) -> Result<Vec<ClusterNodeIndexResponse>, Error> {
> -        let url = format!("/api2/extjs/nodes");
> -        Ok(self.0.get(&url).await?.expect_json()?.data)
> +        let url = "/api2/extjs/nodes";
> +        Ok(self.0.get(url).await?.expect_json()?.data)
>      }
>  
>      /// Virtual machine index (per node).
> @@ -1010,7 +1010,7 @@ where
>      /// API version details, including some parts of the global datacenter
>      /// config.
>      async fn version(&self) -> Result<VersionResponse, Error> {
> -        let url = format!("/api2/extjs/version");
> -        Ok(self.0.get(&url).await?.expect_json()?.data)
> +        let url = "/api2/extjs/version";
> +        Ok(self.0.get(url).await?.expect_json()?.data)
>      }
>  }
> -- 
> 2.39.5


_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


  reply	other threads:[~2025-01-14 13:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-13 12:12 [pdm-devel] [PATCH proxmox-api-types 1/4] verifiers: Remove manual contains() implementation Maximiliano Sandoval
2025-01-13 12:12 ` [pdm-devel] [PATCH proxmox-api-types 2/4] types: elide lifetimes when possible Maximiliano Sandoval
2025-01-13 12:12 ` [pdm-devel] [PATCH proxmox-api-types 3/4] pve-api-types: Use &str instead of format! Maximiliano Sandoval
2025-01-14 13:21   ` Wolfgang Bumiller [this message]
2025-01-13 12:12 ` [pdm-devel] [PATCH proxmox-api-types 4/4] generated code: Do not return unit value Maximiliano Sandoval
2025-01-13 12:21 ` [pdm-devel] applied: [PATCH proxmox-api-types 1/4] verifiers: Remove manual contains() implementation Dietmar Maurer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jpcieoad73h6p4p25mtidsphcqhwenq7h25ixj3zl6femxmigi@hhv3q76jsetk \
    --to=w.bumiller@proxmox.com \
    --cc=m.sandoval@proxmox.com \
    --cc=pdm-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal