Index a pack's objects of one family into `content key → bytes`.
(
pack: &'a SyncPack,
family: ObjectFamily,
)
| 134 | |
| 135 | /// Index a pack's objects of one family into `content key → bytes`. |
| 136 | fn objects_by_key<'a>( |
| 137 | pack: &'a SyncPack, |
| 138 | family: ObjectFamily, |
| 139 | ) -> impl Iterator<Item = (String, Vec<u8>)> + 'a { |
| 140 | pack.objects |
| 141 | .iter() |
| 142 | .filter(move |o| o.family == family) |
| 143 | .map(|o| (o.key.clone(), o.bytes.clone())) |
| 144 | } |
| 145 | |
| 146 | /// First 12 chars of a base32 key, for display. |
| 147 | fn short(key: &str) -> &str { |
no test coverage detected