From 0db90530beef69e557ca22d585d0d360d1da853a Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 8 Mar 2022 00:03:02 -0800 Subject: refactor(divina): return clone of config by default --- crates/divina/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/divina/src/lib.rs') diff --git a/crates/divina/src/lib.rs b/crates/divina/src/lib.rs index 2ce057e..5656e73 100644 --- a/crates/divina/src/lib.rs +++ b/crates/divina/src/lib.rs @@ -32,7 +32,7 @@ mod cli; use divina_compile::Compiler; use divina_config::Config; -#[derive(Default)] +#[derive(Default, Clone)] pub struct Divina { config: Config, compiler: Compiler, @@ -58,7 +58,7 @@ impl Divina { } #[must_use] - pub const fn expose_config(&self) -> &Config { &self.config } + pub fn expose_config(&self) -> Config { self.config.clone() } pub fn configure_compiler(&mut self, compiler: Compiler) { self.compiler = compiler; } } -- cgit v1.2.3