Constant veloren_server::settings::MIGRATION_UPGRADE_GUARANTEE

source ยท
const MIGRATION_UPGRADE_GUARANTEE: &str = "Any valid file of an old verison should be able to \
                                           successfully migrate to the latest version.";
Expand description

Our upgrade guarantee is that if validation succeeds for an old version, then migration to the next version must always succeed and produce a valid settings file for that version (if we need to change this in the future, it should require careful discussion). Therefore, we would normally panic if the upgrade produced an invalid settings file, which we would perform by doing the following post-validation (example is given for a hypothetical upgrade from Whitelist_V1 to Whitelist_V2):

Ok(Whitelist_V2::try_into().expect())