Use for `in/not_in` validation to convert the slices to strings.
(slice: &[&str])
| 8 | |
| 9 | /// Use for `in/not_in` validation to convert the slices to strings. |
| 10 | pub fn str_slice_to_string(slice: &[&str]) -> Vec<String> { |
| 11 | slice.iter().map(|el| String::from(*el)).collect() |
| 12 | } |
| 13 | |
| 14 | #[test] |
| 15 | fn properly_validates() { |