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 } } }