Skip to content

Commit

Permalink
use ref srs
Browse files Browse the repository at this point in the history
  • Loading branch information
skarimo committed Feb 12, 2024
1 parent b10a73b commit b5e7ae9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .generator/src/generator/templates/configuration.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();
Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/datadog/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();
Expand All @@ -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;
Expand Down

0 comments on commit b5e7ae9

Please sign in to comment.