Function cargo_util::paths::write_if_changed

source ยท
pub fn write_if_changed<P: AsRef<Path>, C: AsRef<[u8]>>(
    path: P,
    contents: C,
) -> Result<()>
Expand description

Equivalent to write(), but does not write anything if the file contents are identical to the given contents.