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