all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox] notify: clippy fixes
@ 2025-04-10  9:30 Lukas Wagner
  2025-04-15 10:27 ` [pbs-devel] applied: " Fabian Grünbichler
  0 siblings, 1 reply; 2+ messages in thread
From: Lukas Wagner @ 2025-04-10  9:30 UTC (permalink / raw)
  To: pbs-devel

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
 proxmox-notify/src/endpoints/webhook.rs | 2 +-
 proxmox-notify/src/renderer/mod.rs      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxmox-notify/src/endpoints/webhook.rs b/proxmox-notify/src/endpoints/webhook.rs
index 604777c7..eada590e 100644
--- a/proxmox-notify/src/endpoints/webhook.rs
+++ b/proxmox-notify/src/endpoints/webhook.rs
@@ -359,7 +359,7 @@ impl WebhookEndpoint {
         //
         // -> send the header always, unless we do a get with no body (which is the expected case
         // for GET)
-        let content_length = body.as_bytes().len();
+        let content_length = body.len();
         if !(self.config.method == HttpMethod::Get && content_length == 0) {
             builder = builder.header(http::header::CONTENT_LENGTH, content_length);
         }
diff --git a/proxmox-notify/src/renderer/mod.rs b/proxmox-notify/src/renderer/mod.rs
index b37cf438..bff76ed1 100644
--- a/proxmox-notify/src/renderer/mod.rs
+++ b/proxmox-notify/src/renderer/mod.rs
@@ -285,7 +285,7 @@ fn render_template_impl(
     filename: &str,
     source: TemplateSource,
 ) -> Result<Option<String>, Error> {
-    let template_string = context::context().lookup_template(&filename, None, source)?;
+    let template_string = context::context().lookup_template(filename, None, source)?;
 
     if let Some(template_string) = template_string {
         let mut handlebars = Handlebars::new();
-- 
2.39.5



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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pbs-devel] applied:  [PATCH proxmox] notify: clippy fixes
  2025-04-10  9:30 [pbs-devel] [PATCH proxmox] notify: clippy fixes Lukas Wagner
@ 2025-04-15 10:27 ` Fabian Grünbichler
  0 siblings, 0 replies; 2+ messages in thread
From: Fabian Grünbichler @ 2025-04-15 10:27 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion

thanks!

On April 10, 2025 11:30 am, Lukas Wagner wrote:
> Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
> ---
>  proxmox-notify/src/endpoints/webhook.rs | 2 +-
>  proxmox-notify/src/renderer/mod.rs      | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/proxmox-notify/src/endpoints/webhook.rs b/proxmox-notify/src/endpoints/webhook.rs
> index 604777c7..eada590e 100644
> --- a/proxmox-notify/src/endpoints/webhook.rs
> +++ b/proxmox-notify/src/endpoints/webhook.rs
> @@ -359,7 +359,7 @@ impl WebhookEndpoint {
>          //
>          // -> send the header always, unless we do a get with no body (which is the expected case
>          // for GET)
> -        let content_length = body.as_bytes().len();
> +        let content_length = body.len();
>          if !(self.config.method == HttpMethod::Get && content_length == 0) {
>              builder = builder.header(http::header::CONTENT_LENGTH, content_length);
>          }
> diff --git a/proxmox-notify/src/renderer/mod.rs b/proxmox-notify/src/renderer/mod.rs
> index b37cf438..bff76ed1 100644
> --- a/proxmox-notify/src/renderer/mod.rs
> +++ b/proxmox-notify/src/renderer/mod.rs
> @@ -285,7 +285,7 @@ fn render_template_impl(
>      filename: &str,
>      source: TemplateSource,
>  ) -> Result<Option<String>, Error> {
> -    let template_string = context::context().lookup_template(&filename, None, source)?;
> +    let template_string = context::context().lookup_template(filename, None, source)?;
>  
>      if let Some(template_string) = template_string {
>          let mut handlebars = Handlebars::new();
> -- 
> 2.39.5
> 
> 
> 
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
> 
> 
> 


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-15 10:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-10  9:30 [pbs-devel] [PATCH proxmox] notify: clippy fixes Lukas Wagner
2025-04-15 10:27 ` [pbs-devel] applied: " Fabian Grünbichler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal