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/fmt.rs
6939 views
1
use std::fmt::{Debug, Formatter, Result, Write};
2
3
use super::super::fmt::write_vec;
4
use super::BooleanArray;
5
6
pub fn write_value<W: Write>(array: &BooleanArray, index: usize, f: &mut W) -> Result {
7
write!(f, "{}", array.value(index))
8
}
9
10
impl Debug for BooleanArray {
11
fn fmt(&self, f: &mut Formatter) -> Result {
12
let writer = |f: &mut Formatter, index| write_value(self, index, f);
13
14
write!(f, "BooleanArray")?;
15
write_vec(f, writer, self.validity(), self.len(), "None", false)
16
}
17
}
18
19