Skip to main content

key_order

Function key_order 

Source
fn key_order(left: &str, right: &str) -> Ordering
Expand description

The DAG-CBOR map key ordering: shorter keys first, then bytewise.

Plain bytewise ordering — what BTreeMap<String, _> gives — is a different order and a different set of bytes, and a suite that compared an encoder against itself would never notice.