pub(crate) fn write_char(writer: &mut impl Write, c: char) -> Result<()>
Writes a character to the writer.