style: format shared declaration construction seam
This commit is contained in:
@@ -1907,7 +1907,10 @@ fn construct_declarations<'a>(
|
|||||||
.map_err(|error| (index, error))?;
|
.map_err(|error| (index, error))?;
|
||||||
target.nodes.insert(node.id, node);
|
target.nodes.insert(node.id, node);
|
||||||
}
|
}
|
||||||
Ok(ConstructedDeclarations { project, legacy_elements })
|
Ok(ConstructedDeclarations {
|
||||||
|
project,
|
||||||
|
legacy_elements,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn resolve_declarations(
|
pub(crate) fn resolve_declarations(
|
||||||
@@ -1917,8 +1920,10 @@ pub(crate) fn resolve_declarations(
|
|||||||
limits: ParseLimits,
|
limits: ParseLimits,
|
||||||
) -> Result<crate::persistence::DecodeResult, (usize, Error)> {
|
) -> Result<crate::persistence::DecodeResult, (usize, Error)> {
|
||||||
let legacy = project.schema_version == 3;
|
let legacy = project.schema_version == 3;
|
||||||
let ConstructedDeclarations { project, legacy_elements } =
|
let ConstructedDeclarations {
|
||||||
construct_declarations(project, declarations, aliases, |_| Ok(()))?;
|
project,
|
||||||
|
legacy_elements,
|
||||||
|
} = construct_declarations(project, declarations, aliases, |_| Ok(()))?;
|
||||||
if legacy {
|
if legacy {
|
||||||
let migrated = source3_bridge::from_scratch(project, legacy_elements)
|
let migrated = source3_bridge::from_scratch(project, legacy_elements)
|
||||||
.and_then(|old| crate::persistence::v3::migrate(old, limits))
|
.and_then(|old| crate::persistence::v3::migrate(old, limits))
|
||||||
|
|||||||
Reference in New Issue
Block a user