pub(crate) fn write_slice_like( f: &mut impl Write, prefix: &[String], has_dot_dot: bool, suffix: &[String], ) -> Result