polars_arrow/array/boolean/
fmt.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::fmt::{Debug, Formatter, Result, Write};

use super::super::fmt::write_vec;
use super::BooleanArray;

pub fn write_value<W: Write>(array: &BooleanArray, index: usize, f: &mut W) -> Result {
    write!(f, "{}", array.value(index))
}

impl Debug for BooleanArray {
    fn fmt(&self, f: &mut Formatter) -> Result {
        let writer = |f: &mut Formatter, index| write_value(self, index, f);

        write!(f, "BooleanArray")?;
        write_vec(f, writer, self.validity(), self.len(), "None", false)
    }
}