/// Converts arrays or vectors of strs to a vector of owned strings
pub trait ToStrings {
fn to_strings(&self) -> Vec<String>;
}
impl<T: ToString> ToStrings for Vec<T> {
/// Converts arrays or vectors of strs to a vector of owned strings
fn to_strings(&self) -> Vec<String> {
self.into_iter().map(|s| s.to_string()).collect()
}
}
impl<T: ToString> ToStrings for [T] {
/// Converts arrays or vectors of strs to a vector of owned strings
fn to_strings(&self) -> Vec<String> {
self.into_iter().map(|s| s.to_string()).collect::<Vec<String>>()
}
}