From 797430c9d20887768b2a8b7d171aee0aebfcf6d4 Mon Sep 17 00:00:00 2001 From: phoenix Date: Fri, 10 Oct 2025 14:24:04 -0400 Subject: [PATCH] Changed name of function --- src/utility.rs | 4 +++- tests/test.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utility.rs b/src/utility.rs index 0c749f0..ebc966d 100644 --- a/src/utility.rs +++ b/src/utility.rs @@ -1,4 +1,6 @@ -pub fn split_words(var: &crate::EnvVar) -> Result, std::io::Error> { +/// Take the Environment variable and delimitize it. If the value has a delimiter, +/// extract it into some strings +pub fn delimitize(var: &crate::EnvVar) -> Result, std::io::Error> { if var.has_delimiter { Ok(var.value.split(var.delimiter).map(|c| c.parse::().unwrap()).collect()) } else { diff --git a/tests/test.rs b/tests/test.rs index c09967e..20a9468 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -118,7 +118,7 @@ mod tests { assert_eq!(result.has_delimiter, true, "The {} variable has an issue finding the delimiter", result.key); - match icarus_envy::utility::split_words(&result) { + match icarus_envy::utility::delimitize(&result) { Ok(allowed_origins) => { assert_eq!(allowed_origins.len(), 2, "The amount of allowed origins does not match. {} {}", allowed_origins.len(), 2) }