diff --git a/src/main.rs b/src/main.rs index f54b161..6983aa1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,7 +38,7 @@ async fn create_topic>(topic: T) -> Result>(queue: T) -> Result<(SQSQueueURL, SQSQueueA let queue: String = if CLUSTER_ENV.get().unwrap().is_unknown() { queue.as_ref().to_string() } else { - let suffix = CLUSTER_ENV.get().unwrap().for_queue(); + let suffix = CLUSTER_ENV.get().unwrap().as_suffix(); println!( "Suffixing queue \"{}\" as \"{}-{}\" per in-cluster configuration...", queue.as_ref(), diff --git a/src/types.rs b/src/types.rs index 7903e81..f92d028 100644 --- a/src/types.rs +++ b/src/types.rs @@ -46,17 +46,7 @@ impl EnvName { } } - pub fn for_queue(&self) -> &str { - match self { - EnvName::QA => "qa", - EnvName::Local => "local", - EnvName::Dev => "development", - EnvName::Prod => "production", - EnvName::Unknown => "unknown", - } - } - - pub fn for_topic(&self) -> &str { + pub fn as_suffix(&self) -> &str { match self { EnvName::QA => "qa", EnvName::Dev => "dev",