From cc457a85a2935dff011849831e6e498d45c88c3e Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 6 Aug 2024 19:26:17 +0200 Subject: [PATCH] Prepare for follow-on change --- crates/fj-core/src/core.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/fj-core/src/core.rs b/crates/fj-core/src/core.rs index d53e7d3a2..47336abcc 100644 --- a/crates/fj-core/src/core.rs +++ b/crates/fj-core/src/core.rs @@ -15,14 +15,16 @@ pub struct Core { impl Core { /// Construct an instance of `Core` pub fn new() -> Self { - Self { - layers: Layers::default(), - } + Self::from_layers(Layers::default()) } /// Construct an instance of `Core`, using the provided configuration pub fn with_validation_config(config: ValidationConfig) -> Self { let layers = Layers::with_validation_config(config); + Self::from_layers(layers) + } + + fn from_layers(layers: Layers) -> Self { Self { layers } } }