Skip to main content

Module migrate

Module migrate 

Source
Expand description

Version-peeking helper for the save migration chain.

Splitting this out of mod.rs keeps the dispatch in super::load_from_str readable and gives version detection its own focused test surface.

Functions§

peek_version
Read the top-level "version" field from a save JSON without deserializing the rest of the document. Returns 1 if the field is absent, non-numeric, or the JSON itself is malformed — pre-versioned saves (everything written by main before this branch) are V1 by definition.