diff --git a/.generator/src/generator/templates/configuration.j2 b/.generator/src/generator/templates/configuration.j2 index b74794cd5..445f80edc 100644 --- a/.generator/src/generator/templates/configuration.j2 +++ b/.generator/src/generator/templates/configuration.j2 @@ -28,7 +28,7 @@ impl Configuration { Configuration::default() } - pub fn set_unstable_operation_enabled(&mut self, operation: &String, enabled: bool) -> bool { + pub fn set_unstable_operation_enabled(&mut self, operation: &str, enabled: bool) -> bool { if let Some(unstable_operations) = &mut self.unstable_operations { if unstable_operations.contains_key(operation) { unstable_operations.insert(operation.to_string(), enabled); @@ -40,7 +40,7 @@ impl Configuration { false } - pub fn is_unstable_operation_enabled(&self, operation: &String) -> bool { + pub fn is_unstable_operation_enabled(&self, operation: &str) -> bool { if let Some(unstable_operations) = &self.unstable_operations { if unstable_operations.contains_key(operation) { return unstable_operations.get(operation).unwrap().clone(); @@ -51,7 +51,7 @@ impl Configuration { false } - pub fn is_unstable_operation(&self, operation: &String) -> bool { + pub fn is_unstable_operation(&self, operation: &str) -> bool { if let Some(unstable_operations) = &self.unstable_operations { if unstable_operations.contains_key(operation) { return true; diff --git a/src/datadog/configuration.rs b/src/datadog/configuration.rs index b677b77d5..f96db9dd1 100644 --- a/src/datadog/configuration.rs +++ b/src/datadog/configuration.rs @@ -20,7 +20,7 @@ impl Configuration { Configuration::default() } - pub fn set_unstable_operation_enabled(&mut self, operation: &String, enabled: bool) -> bool { + pub fn set_unstable_operation_enabled(&mut self, operation: &str, enabled: bool) -> bool { if let Some(unstable_operations) = &mut self.unstable_operations { if unstable_operations.contains_key(operation) { unstable_operations.insert(operation.to_string(), enabled); @@ -35,7 +35,7 @@ impl Configuration { false } - pub fn is_unstable_operation_enabled(&self, operation: &String) -> bool { + pub fn is_unstable_operation_enabled(&self, operation: &str) -> bool { if let Some(unstable_operations) = &self.unstable_operations { if unstable_operations.contains_key(operation) { return unstable_operations.get(operation).unwrap().clone(); @@ -49,7 +49,7 @@ impl Configuration { false } - pub fn is_unstable_operation(&self, operation: &String) -> bool { + pub fn is_unstable_operation(&self, operation: &str) -> bool { if let Some(unstable_operations) = &self.unstable_operations { if unstable_operations.contains_key(operation) { return true;