fn read_initial_mutations_from_local_store_dir<P: AsRef<Path>>(
    local_store_dir: P,
) -> Vec<RegistryAtomicMutateRequest> {
    let store = LocalStoreImpl::new(local_store_dir.as_ref());
    let changelog = store
        .get_changelog_since_version(ZERO_REGISTRY_VERSION)
        .unwrap_or_else(|e| {
            panic!(
                "Could not read the content of the local store at {} due to: {}",
                local_store_dir.as_ref().to_str().unwrap_or("").to_string(),
                e
            )
        });
    changelog
        .into_iter()
        .map(|cle: ChangelogEntry| RegistryAtomicMutateRequest {
            mutations: cle
                .into_iter()
                .map(|km: KeyMutation| match km.value {
                    Some(bytes) => upsert(km.key.as_bytes(), bytes),
                    None => delete(km.key),
                })
                .collect(),
            preconditions: vec![],
        })
        .collect()
}
/// Reads the initial content to inject into the registry in the "local store"
/// format.
///
/// `local_store_dir` is expected to be a directory containing specially-named
/// files following the schema implemented in local_store.rs.
Reads the initial content to inject into the registry in the "local store"
format.

`local_store_dir` is expected to be a directory containing specially-named
files following the schema implemented in local_store.rs.
Reads the initial content to inject into the registry in the " local store " format . ` local_store_dir ` is expected to be a directory containing specially - named files following the schema implemented in local_store . rs .
fn read_initial_mutations_from_local_store_dir<P: AsRef<Path>>(
    local_store_dir: P,
) -> Vec<RegistryAtomicMutateRequest> {
    let store = LocalStoreImpl::new(local_store_dir.as_ref());
    let changelog = store
        .get_changelog_since_version(ZERO_REGISTRY_VERSION)
        .unwrap_or_else(|e| {
            panic!(
                "Could not read the content of the local store at {} due to: {}",
                local_store_dir.as_ref().to_str().unwrap_or("").to_string(),
                e
            )
        });
    changelog
        .into_iter()
        .map(|cle: ChangelogEntry| RegistryAtomicMutateRequest {
            mutations: cle
                .into_iter()
                .map(|km: KeyMutation| match km.value {
                    Some(bytes) => upsert(km.key.as_bytes(), bytes),
                    None => delete(km.key),
                })
                .collect(),
            preconditions: vec![],
        })
        .collect()
}
fn read_initial_mutations_from_local_store_dir < P : AsRef < Path > > ( local_store_dir : P , ) -> Vec < RegistryAtomicMutateRequest > { let store = LocalStoreImpl :: new ( local_store_dir . as_ref ( ) ) ; let changelog = store . get_changelog_since_version ( ZERO_REGISTRY_VERSION ) . unwrap_or_else ( | e | { panic ! ( " " local_store_dir as_ref ( ) to_str ( ) unwrap_or ( " " ) to_string ( ) e ) } ) ; changelog . into_iter ( ) . map ( | cle : ChangelogEntry | RegistryAtomicMutateRequest { mutations : cle . into_iter ( ) . map ( | km : KeyMutation | match km . value { Some ( bytes ) => upsert ( km . key . as_bytes ( ) , bytes ) , None => delete ( km . key ) , } ) . collect ( ) , preconditions : vec ! [ ] , } ) . collect ( ) }
Reads the initial content to inject into the registry in the "local store"
format.
Reads the initial content to inject into the registry in the " local store " format .
local_store_dir
P
local_store_dir
P