mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-02 00:49:20 +00:00
notify: clippy fixes
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
This commit is contained in:
parent
08c28ddeaf
commit
bc078b9f59
@ -359,7 +359,7 @@ impl WebhookEndpoint {
|
|||||||
//
|
//
|
||||||
// -> send the header always, unless we do a get with no body (which is the expected case
|
// -> send the header always, unless we do a get with no body (which is the expected case
|
||||||
// for GET)
|
// for GET)
|
||||||
let content_length = body.as_bytes().len();
|
let content_length = body.len();
|
||||||
if !(self.config.method == HttpMethod::Get && content_length == 0) {
|
if !(self.config.method == HttpMethod::Get && content_length == 0) {
|
||||||
builder = builder.header(http::header::CONTENT_LENGTH, content_length);
|
builder = builder.header(http::header::CONTENT_LENGTH, content_length);
|
||||||
}
|
}
|
||||||
|
@ -285,7 +285,7 @@ fn render_template_impl(
|
|||||||
filename: &str,
|
filename: &str,
|
||||||
source: TemplateSource,
|
source: TemplateSource,
|
||||||
) -> Result<Option<String>, Error> {
|
) -> 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 {
|
if let Some(template_string) = template_string {
|
||||||
let mut handlebars = Handlebars::new();
|
let mut handlebars = Handlebars::new();
|
||||||
|
Loading…
Reference in New Issue
Block a user