Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pola-rs
GitHub Repository: pola-rs/polars
Path: blob/main/crates/polars-arrow/src/array/boolean/from.rs
6939 views
1
use super::{BooleanArray, MutableBooleanArray};
2
3
impl<P: AsRef<[Option<bool>]>> From<P> for BooleanArray {
4
fn from(slice: P) -> Self {
5
MutableBooleanArray::from(slice).into()
6
}
7
}
8
9
impl<Ptr: std::borrow::Borrow<Option<bool>>> FromIterator<Ptr> for BooleanArray {
10
fn from_iter<I: IntoIterator<Item = Ptr>>(iter: I) -> Self {
11
MutableBooleanArray::from_iter(iter).into()
12
}
13
}
14
15