Skip to main content

write_if

Function write_if 

Source
pub(crate) fn write_if(
    output: &mut (impl Write + ?Sized),
    pred: bool,
    s: &str,
) -> Result<usize>
Available on crate feature formatting only.
Expand description

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