Skip to main content

minify_versions

Function minify_versions 

Source
pub fn minify_versions(
    versions: &[Map<String, Value>],
) -> Vec<Map<String, Value>>
Expand description

Minify a fully-materialized version list (newest-first) into the composer/2.0 sparse-diff form. Inverse of expand_versions: expand_versions(minify_versions(v)) == v for any well-formed v (compared as key/value sets — key order is not preserved).

The first entry is emitted whole; each later entry carries only the keys that changed versus the entry before it, plus an UNSET sentinel for every key the previous entry had that this one drops.