From e495b99abee45657883e762d3069af80d76faba8 Mon Sep 17 00:00:00 2001 From: Jere Vaara Date: Tue, 15 Oct 2024 16:07:41 +0300 Subject: [PATCH] Add to_string for privilege --- compute_tools/src/compute.rs | 2 +- compute_tools/src/privilege.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/compute_tools/src/compute.rs b/compute_tools/src/compute.rs index ec83efbb17..ae2682b682 100644 --- a/compute_tools/src/compute.rs +++ b/compute_tools/src/compute.rs @@ -1387,7 +1387,7 @@ LIMIT 100", "GRANT {} ON SCHEMA {} TO {}", privileges .iter() - .map(|p| p.as_str().to_string()) + .map(|p| p.to_string()) .collect::>() .join(", "), schema_name, diff --git a/compute_tools/src/privilege.rs b/compute_tools/src/privilege.rs index defeae5259..dc4a768651 100644 --- a/compute_tools/src/privilege.rs +++ b/compute_tools/src/privilege.rs @@ -55,4 +55,7 @@ impl Privilege { Privilege::Execute => "EXECUTE", } } + pub fn to_string(&self) -> String { + self.as_str().to_string() + } }