time::formatting

Function write_if

Source
pub(crate) fn write_if(
    output: &mut impl Write,
    pred: bool,
    bytes: &[u8],
) -> Result<usize>
Expand description

If pred is true, write all bytes to the output, returning the number of bytes written.