Skip to main content

fmt_snapshot

Function fmt_snapshot 

Source
pub fn fmt_snapshot(snapshot: &Path) -> Result<String, GitClosureError>
Expand description

Reads and canonicalizes a snapshot file using default FmtOptions.

The result is byte-identical to what crate::build_snapshot would produce for the same content — modulo the structural hash which is recomputed from the parsed file list. Use --check mode in the fmt subcommand to detect snapshots that are not yet in canonical form.