pub trait Parameters {
fn into_vec(self) -> Vec<String>;
}
impl Parameters for &str {
fn into_vec(self) -> Vec<String> {
vec![self.to_string()]
}
}
impl Parameters for Vec<String> {
fn into_vec(self) -> Vec<String> {
self
}
}
impl<'a> Parameters for &'a [&'a str] {
fn into_vec(self) -> Vec<String> {
self.iter().map(|s| s.to_string()).collect()
}
}
impl<const N: usize> Parameters for [&str; N] {
fn into_vec(self) -> Vec<String> {
self.iter().map(|s| s.to_string()).collect()
}
}