From 6eae2f52533d2e2d9073e73c22587910b1170d78 Mon Sep 17 00:00:00 2001 From: Kexiang Wang Date: Fri, 22 Nov 2024 15:43:20 -0500 Subject: [PATCH] fix --- src/frontend/src/binder/expr/mod.rs | 2 +- src/frontend/src/webhook/utils.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/binder/expr/mod.rs b/src/frontend/src/binder/expr/mod.rs index b3ffac777ca4..ae2c08988412 100644 --- a/src/frontend/src/binder/expr/mod.rs +++ b/src/frontend/src/binder/expr/mod.rs @@ -95,7 +95,7 @@ impl Binder { // - secret name // - the name of the payload column // TODO(Kexiang): Generated columns or INCLUDE clause should be supported. - if ident.real_value() == "headers".to_string() { + if ident.real_value() == *"headers" { Ok(InputRef::new(0, DataType::Jsonb).into()) } else if ident.real_value() == ctx.secret_name { Ok(InputRef::new(1, DataType::Varchar).into()) diff --git a/src/frontend/src/webhook/utils.rs b/src/frontend/src/webhook/utils.rs index 360ba7ddbeae..c368d534127d 100644 --- a/src/frontend/src/webhook/utils.rs +++ b/src/frontend/src/webhook/utils.rs @@ -63,7 +63,7 @@ impl IntoResponse for WebhookError { pub(crate) fn header_map_to_json(headers: &HeaderMap) -> JsonbVal { let mut header_map = HashMap::new(); - for (key, value) in headers.iter() { + for (key, value) in headers { let key = key.as_str().to_string(); let value = value.to_str().unwrap_or("").to_string(); header_map.insert(key, value);