vergen_lib

Function count_idempotent

Source
pub fn count_idempotent(map: &CargoRustcEnvMap) -> usize
Expand description

Count the number of idempotent entries in a CargoRustcEnvMap

NOTE - This is mainly used for testing.

ยงExample

let mut map: CargoRustcEnvMap = BTreeMap::new();
assert_eq!(0, count_idempotent(&map));
_ = map.insert(VergenKey::BuildDate, VERGEN_IDEMPOTENT_DEFAULT.to_string());
assert_eq!(1, count_idempotent(&map));