pub(crate) fn write_document(
path: &Path,
doc: &DocumentMut,
) -> Result<(), String>Expand description
Writes next to the file, then renames, so a crash never leaves half a configuration. A configuration that is a link (kept in a dotfiles folder) is written where it points, the link kept.