feat: add from String implementation

pull/24376/head
Edd Robinson 2020-12-04 10:01:13 +00:00
parent e400fb71bb
commit 596e20ac92
1 changed files with 7 additions and 0 deletions

View File

@ -1458,6 +1458,13 @@ impl From<&[Option<&str>]> for Column {
}
}
impl From<&[Option<String>]> for Column {
fn from(arr: &[Option<String>]) -> Self {
let other = arr.iter().map(|x| x.as_deref()).collect::<Vec<_>>();
Self::from(other.as_slice())
}
}
impl From<&[&str]> for Column {
fn from(arr: &[&str]) -> Self {
let data = StringEncoding::from_strs(arr);